--- # Copyright 2019 Nokia # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Set requested CPUs. set_fact: cpu_request: "{% if cpu_set.opt is defined %}{{ perf_profile[cpu_set.opt] }}{% else %}{{ cpu_set.request }}{% endif %}" - name: Allocate CPU set. set_fact: allocated_cpu_set: "{{ cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}" - name: Append allocated CPU set. set_fact: combined_cpu_set: "{{ allocated_cpu_set | union(cpu_sets[cpu_set.name] | default([])) | sort }}" - name: Make CPU set. set_fact: cpu_sets: "{{ cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}" cpu_topology: "{{ cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}" - name: Show created CPU sets. debug: var: cpu_sets - name: Show CPU topology after sets creation. debug: var: cpu_topology