X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=roles%2Fallocate_cpu_cores%2Ftasks%2Fmake_cpu_sets.yaml;h=b11e480cdb6c44be182150251387bd74b102356e;hb=bb5a48dd936f398e07335212583c5859abf0fafc;hp=4bb38161426c35b4f1d578499485107693f44ceb;hpb=74a49ba6ef2ea715fa492db0bcd85c30398688e8;p=ta%2Finfra-ansible.git diff --git a/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml b/roles/allocate_cpu_cores/tasks/make_cpu_sets.yaml index 4bb3816..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: "{{ ncir_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(ncir_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: - ncir_cpu_sets: "{{ ncir_cpu_sets | combine({ cpu_set.name: combined_cpu_set }) }}" - ncir_cpu_topology: "{{ ncir_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: ncir_cpu_sets + var: cpu_sets - name: Show CPU topology after sets creation. debug: - var: ncir_cpu_topology + var: cpu_topology