4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 - name: collect facts from all hosts
19 delegate_to: "{{ item }}"
21 with_items: "{{ groups['all'] }}"
23 - name: make cpu pooler configs
25 cpu_poolconfigs: "{{ lookup('template', 'cpu_pooler_config.yaml.j2') | from_yaml }}"
27 - name: template cpu pooler fact file
29 content: "{{ cpu_poolconfigs | to_nice_json }}"
30 dest: "/etc/ansible/facts.d/cpu_pooler_config.fact"
33 register: cpu_pooler_template
35 - name: sync to avoid IO issues
41 when: cpu_pooler_template | changed