|
1 | 1 | --- |
2 | | -- name: Get facts for control host |
| 2 | +- name: Set facts for control host |
3 | 3 | hosts: localhost |
4 | 4 | gather_facts: true |
5 | 5 | tasks: |
|
9 | 9 | {{ 'genericswitch' in kolla_neutron_ml2_mechanism_drivers | default(false) }} |
10 | 10 | when: kolla_neutron_ml2_mechanism_drivers |
11 | 11 |
|
12 | | -- name: Get facts for seed node |
| 12 | +- name: Set facts for seed node |
13 | 13 | hosts: seed |
14 | 14 | gather_facts: true |
15 | 15 | tasks: |
16 | 16 | - name: Is there a dedicated seed node? |
17 | 17 | ansible.builtin.set_fact: |
18 | 18 | seed_node_is_vm: "{{ ansible_facts.virtualization_role == 'guest' }}" |
19 | 19 |
|
20 | | -- name: Get facts |
| 20 | +- name: Set facts for all hosts |
21 | 21 | hosts: all |
22 | 22 | gather_facts: true |
23 | 23 | tasks: |
|
27 | 27 | timeout: 5 |
28 | 28 | ignore_errors: true |
29 | 29 |
|
30 | | - - name: Set internet connectivity fact |
31 | | - ansible.builtin.set_fact: |
32 | | - internet_connectivity: "{{ not successful_ping.failed }}" |
33 | | - - name: Get OS distribution |
34 | | - ansible.builtin.set_fact: |
35 | | - distribution: "{{ ansible_facts.distribution }}" |
36 | | - |
37 | | - |
38 | | - - name: Get OS distribution release |
39 | | - ansible.builtin.set_fact: |
40 | | - distribution_release: "{{ ansible_facts.distribution_release }}" |
41 | | - |
42 | | - |
43 | 30 | - name: Get kernel version |
44 | 31 | ansible.builtin.command: "uname -r" |
45 | 32 | register: kernel_version |
46 | 33 |
|
47 | | - - name: Check if docker is installed |
| 34 | + - name: Check if Docker is installed |
48 | 35 | ansible.builtin.command: "which docker" |
49 | 36 | register: docker_check |
50 | 37 | failed_when: docker_check.rc not in [0] |
|
56 | 43 | register: containers_list |
57 | 44 | when: not docker_check.failed |
58 | 45 |
|
59 | | - - name: Check if hugepages enabled |
| 46 | + - name: Set facts |
60 | 47 | ansible.builtin.set_fact: |
| 48 | + internet_connectivity: "{{ not successful_ping.failed }}" |
| 49 | + distribution: "{{ ansible_facts.distribution }}" |
| 50 | + distribution_release: "{{ ansible_facts.distribution_release }}" |
61 | 51 | hugepages_enabled: "{{ 'hugepages' in ansible_facts.cmdline }}" |
62 | 52 |
|
63 | | -- name: Gather Cloud Facts |
| 53 | +- name: Write cloud facts file |
64 | 54 | hosts: localhost |
65 | 55 | gather_facts: true |
66 | 56 | tasks: |
|
117 | 107 | pulp_tls_enabled: "{{ pulp_enable_tls }}" |
118 | 108 | kolla_image_tags: "{{ kolla_image_tags }}" |
119 | 109 | gpu_passthrough_enabled: "{{ gpu_group_map | length > 0 | bool }}" |
120 | | - vGPU_enabled: "{{ groups['vgpu'] | length > 0 | bool }}" |
| 110 | + vgpu_enabled: "{{ groups['vgpu'] | length > 0 | bool }}" |
121 | 111 | hugepages_enabled: "{{ hostvars | group_hostvars_by_var('hugepages_enabled') }}" |
122 | 112 | ansible.builtin.copy: |
123 | 113 | content: "{{ cloud_facts | to_nice_json(sort_keys=false) }}" |
|
0 commit comments