X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Finfra-ansible.git;a=blobdiff_plain;f=roles%2Fallocate_cpu_cores%2Ftasks%2Fmake_cpu_sets.yaml;h=b11e480cdb6c44be182150251387bd74b102356e;hp=a128fe7ad1d4119a794cc28ed664532103ecae4f;hb=86e9056a7ee8ec41856edb13b72273951edb3d87;hpb=b761808359bb9b38db9847e06bf6a074a09f7807 diff --git a/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml b/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml index a128fe7..b11e480 100644 --- a/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml +++ b/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml @@ -1,5 +1,17 @@ --- -# Copyright (C) 2019 Nokia +# 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: @@ -7,21 +19,21 @@ - name: Allocate CPU set. set_fact: - allocated_cpu_set: "{{ cloud_cpu_topology | cpu_topology_alloc(cpu_request, cpu_set.where) }}" + 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(cloud_cpu_sets[cpu_set.name] | default([])) | sort }}" + combined_cpu_set: "{{ allocated_cpu_set | union(cpu_sets[cpu_set.name] | default([])) | sort }}" - name: Make CPU set. set_fact: - cloud_cpu_sets: "{{ cloud_cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}" - cloud_cpu_topology: "{{ cloud_cpu_topology | cpu_topology_trim(cpu_request, cpu_set.where) }}" + 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: cloud_cpu_sets + var: cpu_sets - name: Show CPU topology after sets creation. debug: - var: cloud_cpu_topology + var: cpu_topology