Use ansible_facts instead
In order to ANSIBLE_INJECT_FACT_VARS=False we have to use ansible_facts instead of ansible_* vars. This change switches our distribution and hostname related items to use ansible_facts instead. Change-Id: Id01e754f0cf9f6e98c02f45a4011f3d6f59f80a1 Related-Bug: #1915761
This commit is contained in:
parent
c739f33f4e
commit
e7bc62c20e
|
@ -105,7 +105,7 @@ EXAMPLES = """
|
||||||
container_puppet_config:
|
container_puppet_config:
|
||||||
step: 1
|
step: 1
|
||||||
puppet-config: /var/lib/container-puppet/container-puppet.json
|
puppet-config: /var/lib/container-puppet/container-puppet.json
|
||||||
short_hostname: "{{ ansible_hostname }}"
|
short_hostname: "{{ ansible_facts['hostname'] }}"
|
||||||
update_config_hash_only: false
|
update_config_hash_only: false
|
||||||
- name: Update config hashes for container startup configs
|
- name: Update config hashes for container startup configs
|
||||||
container_puppet_config:
|
container_puppet_config:
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
--check
|
--check
|
||||||
--config {{ aide_conf_path }}
|
--config {{ aide_conf_path }}
|
||||||
| {{ aide_mua_path }}
|
| {{ aide_mua_path }}
|
||||||
-s '{{ ansible_fqdn }} - AIDE integrity check' {{ aide_email }}
|
-s '{{ ansible_facts['fqdn'] }} - AIDE integrity check' {{ aide_email }}
|
||||||
when:
|
when:
|
||||||
- aide_email.find("v=" ~ "@") == -1
|
- aide_email.find("v=" ~ "@") == -1
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Export ceph authentication
|
- name: Export ceph authentication
|
||||||
shell: |
|
shell: |
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
{{ tripleo_container_cli }} exec ceph-mon-{{ ansible_hostname }} bash -c "ceph auth export"
|
{{ tripleo_container_cli }} exec ceph-mon-{{ ansible_facts['hostname'] }} bash -c "ceph auth export"
|
||||||
become: true
|
become: true
|
||||||
register: bar_ceph_authentication_content
|
register: bar_ceph_authentication_content
|
||||||
tags:
|
tags:
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
- name: Copy the backup to the shared directory
|
- name: Copy the backup to the shared directory
|
||||||
copy:
|
copy:
|
||||||
src: "{{ tripleo_backup_and_restore_ceph_backup_file }}"
|
src: "{{ tripleo_backup_and_restore_ceph_backup_file }}"
|
||||||
dest: "{{ tripleo_backup_and_restore_temporary_dir.path }}/{{ ansible_hostname }}"
|
dest: "{{ tripleo_backup_and_restore_temporary_dir.path }}/{{ ansible_facts['hostname'] }}"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
tags:
|
tags:
|
||||||
- bar_create_recover_image
|
- bar_create_recover_image
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Stop ceph management
|
- name: Stop ceph management
|
||||||
systemd:
|
systemd:
|
||||||
state: stopped
|
state: stopped
|
||||||
name: "ceph-mgr@{{ ansible_hostname }}"
|
name: "ceph-mgr@{{ ansible_facts['hostname'] }}"
|
||||||
become: true
|
become: true
|
||||||
tags:
|
tags:
|
||||||
- bar_create_recover_image
|
- bar_create_recover_image
|
||||||
|
|
|
@ -23,19 +23,19 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- name: Stop ceph monitor
|
- name: Stop ceph monitor
|
||||||
systemd:
|
systemd:
|
||||||
state: stopped
|
state: stopped
|
||||||
name: "ceph-mon@{{ ansible_hostname }}"
|
name: "ceph-mon@{{ ansible_facts['hostname'] }}"
|
||||||
become: true
|
become: true
|
||||||
tags:
|
tags:
|
||||||
- bar_create_recover_image
|
- bar_create_recover_image
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
- name: Stop ceph rgw
|
- name: Stop ceph rgw
|
||||||
systemd:
|
systemd:
|
||||||
state: stopped
|
state: stopped
|
||||||
name: "ceph-radosgw@rgw.{{ ansible_hostname }}.{{ bar_ceph_rgw_name.stdout }}"
|
name: "ceph-radosgw@rgw.{{ ansible_facts['hostname'] }}.{{ bar_ceph_rgw_name.stdout }}"
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- bar_ceph_rgw_exits.stdout!="0"
|
- bar_ceph_rgw_exits.stdout!="0"
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,14 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
image_filename: "/usr/share/openstack-octavia-amphora-images/amphora-x64-haproxy.qcow2"
|
image_filename: "/usr/share/openstack-octavia-amphora-images/amphora-x64-haproxy.qcow2"
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == 'CentOS'
|
- ansible_facts['distribution'] == 'CentOS'
|
||||||
- not (image_filename is defined)
|
- not (image_filename is defined)
|
||||||
|
|
||||||
- name: set location if Red Hat
|
- name: set location if Red Hat
|
||||||
set_fact:
|
set_fact:
|
||||||
image_filename: "/usr/share/openstack-octavia-amphora-images/octavia-amphora.qcow2"
|
image_filename: "/usr/share/openstack-octavia-amphora-images/octavia-amphora.qcow2"
|
||||||
when:
|
when:
|
||||||
- ansible_distribution == 'RedHat'
|
- ansible_facts['distribution'] == 'RedHat'
|
||||||
- not (image_filename is defined)
|
- not (image_filename is defined)
|
||||||
|
|
||||||
- name: check if amphora image file exists
|
- name: check if amphora image file exists
|
||||||
|
|
|
@ -17,5 +17,5 @@
|
||||||
|
|
||||||
test_deps_extra_packages: []
|
test_deps_extra_packages: []
|
||||||
test_deps_setup_tripleo: false
|
test_deps_setup_tripleo: false
|
||||||
test_deps_repo_version: "{{ ansible_distribution | lower }}{{ ansible_distribution_major_version }}-master"
|
test_deps_repo_version: "{{ ansible_facts['distribution'] | lower }}{{ ansible_facts['distribution_major_version'] }}-master"
|
||||||
test_deps_mirrors_file_path: /etc/ci/mirror_info.sh
|
test_deps_mirrors_file_path: /etc/ci/mirror_info.sh
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
@ -39,12 +39,12 @@
|
||||||
- name: RHEL Block
|
- name: RHEL Block
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- (ansible_os_family | lower) == 'redhat'
|
- (ansible_facts['os_family'] | lower) == 'redhat'
|
||||||
- mirrors_file.stat.exists | bool
|
- mirrors_file.stat.exists | bool
|
||||||
block:
|
block:
|
||||||
- name: Fetch latest repo version
|
- name: Fetch latest repo version
|
||||||
uri:
|
uri:
|
||||||
url: https://trunk.rdoproject.org/centos{{ ansible_distribution_major_version }}/current/delorean.repo
|
url: https://trunk.rdoproject.org/centos{{ ansible_facts['distribution_major_version'] }}/current/delorean.repo
|
||||||
return_content: true
|
return_content: true
|
||||||
register: tripleo_packages
|
register: tripleo_packages
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
- name: Tripleo setup block
|
- name: Tripleo setup block
|
||||||
become: true
|
become: true
|
||||||
when:
|
when:
|
||||||
- (ansible_os_family | lower) == 'redhat'
|
- (ansible_facts['os_family'] | lower) == 'redhat'
|
||||||
- test_deps_setup_tripleo | bool
|
- test_deps_setup_tripleo | bool
|
||||||
block:
|
block:
|
||||||
- name: Create tripleo repos
|
- name: Create tripleo repos
|
||||||
|
@ -86,14 +86,14 @@
|
||||||
name: "{{ test_deps_selinux_packages }}"
|
name: "{{ test_deps_selinux_packages }}"
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- (ansible_os_family | lower) == 'redhat'
|
- (ansible_facts['os_family'] | lower) == 'redhat'
|
||||||
|
|
||||||
- name: Install python yaml libs
|
- name: Install python yaml libs
|
||||||
package:
|
package:
|
||||||
name: "{{ test_deps_yaml_packages }}"
|
name: "{{ test_deps_yaml_packages }}"
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- (ansible_os_family | lower) == 'redhat'
|
- (ansible_facts['os_family'] | lower) == 'redhat'
|
||||||
|
|
||||||
- name: Install extra packages
|
- name: Install extra packages
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
name: "{{ tripleo_bootstrap_release_version_package }}"
|
name: "{{ tripleo_bootstrap_release_version_package }}"
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- (ansible_distribution | lower) == 'redhat'
|
- (ansible_facts['distribution'] | lower) == 'redhat'
|
||||||
- (tripleo_bootstrap_release_version_package |list | length) > 0
|
- (tripleo_bootstrap_release_version_package |list | length) > 0
|
||||||
|
|
||||||
- name: Deploy required packages to bootstrap TripleO
|
- name: Deploy required packages to bootstrap TripleO
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
# ignore the case where the package can't be found (e.g. missing subscription).
|
# ignore the case where the package can't be found (e.g. missing subscription).
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1820306
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1820306
|
||||||
failed_when:
|
failed_when:
|
||||||
- (ansible_distribution | lower) == 'redhat'
|
- (ansible_facts['distribution'] | lower) == 'redhat'
|
||||||
- not ansible_check_mode|bool
|
- not ansible_check_mode|bool
|
||||||
- (tripleo_bootstrap_packages_bootstrap_result.rc | int) == 1
|
- (tripleo_bootstrap_packages_bootstrap_result.rc | int) == 1
|
||||||
- not ('No package openvswitch available.' in tripleo_bootstrap_packages_bootstrap_result.failures | default([]))
|
- not ('No package openvswitch available.' in tripleo_bootstrap_packages_bootstrap_result.failures | default([]))
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
|
|
||||||
- name: Create empty ruleset in /etc/sysconfig/iptables and /etc/sysconfig/ip6tables
|
- name: Create empty ruleset in /etc/sysconfig/iptables and /etc/sysconfig/ip6tables
|
||||||
become: true
|
become: true
|
||||||
ignore_errors: "{{ (((ansible_os_family | lower) ~ '-' ~ ansible_distribution_major_version) == 'redhat-7') | bool }}"
|
ignore_errors: "{{ (((ansible_facts['os_family'] | lower) ~ '-' ~ ansible_distribution_major_version) == 'redhat-7') | bool }}"
|
||||||
copy:
|
copy:
|
||||||
dest: "{{ item }}"
|
dest: "{{ item }}"
|
||||||
content: "# empty ruleset created by deployed-server bootstrap"
|
content: "# empty ruleset created by deployed-server bootstrap"
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
- name: Gather variables for each operating system
|
- name: Gather variables for each operating system
|
||||||
include_vars: "{{ item }}"
|
include_vars: "{{ item }}"
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ tripleo_frr_bgp_ipv6_allowas_in: false
|
||||||
tripleo_frr_bgp_neighbor_ttl_security_hops: 1
|
tripleo_frr_bgp_neighbor_ttl_security_hops: 1
|
||||||
tripleo_frr_bgp_uplinks_scope: internal
|
tripleo_frr_bgp_uplinks_scope: internal
|
||||||
tripleo_frr_config_basedir: "/var/lib/config-data/ansible-generated/frr"
|
tripleo_frr_config_basedir: "/var/lib/config-data/ansible-generated/frr"
|
||||||
tripleo_frr_hostname: "{{ ansible_hostname }}"
|
tripleo_frr_hostname: "{{ ansible_facts['hostname'] }}"
|
||||||
tripleo_frr_log_level: informational
|
tripleo_frr_log_level: informational
|
||||||
tripleo_frr_watchfrr: true
|
tripleo_frr_watchfrr: true
|
||||||
tripleo_frr_zebra: false
|
tripleo_frr_zebra: false
|
||||||
|
|
|
@ -38,12 +38,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -56,10 +56,10 @@
|
||||||
when:
|
when:
|
||||||
- item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') != "lo"
|
- item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') != "lo"
|
||||||
# Ensure the interface information is available in the facts
|
# Ensure the interface information is available in the facts
|
||||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_') ] is defined
|
- hostvars[inventory_hostname]['ansible_facts'][item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_')] is defined
|
||||||
# This condition will list all the interfaces except the one with valid IP (which is Provisioning network at this stage)
|
# This condition will list all the interfaces except the one with valid IP (which is Provisioning network at this stage)
|
||||||
# Simpler Version - hostvars[inventory_hostname]['ansible_' + iface_name ]['ipv4'] is undefined
|
# Simpler Version - hostvars[inventory_hostname]['ansible_' + iface_name ]['ipv4'] is undefined
|
||||||
- hostvars[inventory_hostname]['ansible_' + item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_') ]['ipv4'] is undefined
|
- hostvars[inventory_hostname]['ansible_facts'][item.path | regex_replace('(^.*ifcfg-)(.*)', '\\2') | replace('-', '_')]['ipv4'] is undefined
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ ifcfg_files.files }}"
|
- "{{ ifcfg_files.files }}"
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -26,13 +26,20 @@
|
||||||
- lvm_pkg_check.rc == 0
|
- lvm_pkg_check.rc == 0
|
||||||
- tripleo_tripleo_lvmfilter_enabled or tripleo_tripleo_lvmfilter_dry_run
|
- tripleo_tripleo_lvmfilter_enabled or tripleo_tripleo_lvmfilter_dry_run
|
||||||
block:
|
block:
|
||||||
|
- name: collect ansible devices
|
||||||
|
become: true
|
||||||
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- '!all'
|
||||||
|
- devices
|
||||||
|
filter: 'ansible_devices'
|
||||||
- name: collect in-use lvm2 devices list
|
- name: collect in-use lvm2 devices list
|
||||||
become: true
|
become: true
|
||||||
lvm2_physical_devices_facts:
|
lvm2_physical_devices_facts:
|
||||||
- name: set allowed_devices
|
- name: set allowed_devices
|
||||||
set_fact:
|
set_fact:
|
||||||
allowed_devices: "{{ (ansible_facts['lvm2_active_pvs'] | default([]) | list)
|
allowed_devices: "{{ (ansible_facts['lvm2_active_pvs'] | default([]) | list)
|
||||||
| intersect(ansible_devices.keys())
|
| intersect(ansible_facts['devices'].keys())
|
||||||
+ (tripleo_tripleo_lvmfilter_devices_allowlist | default([]))
|
+ (tripleo_tripleo_lvmfilter_devices_allowlist | default([]))
|
||||||
| unique }}"
|
| unique }}"
|
||||||
- name: build lvm2 allow list
|
- name: build lvm2 allow list
|
||||||
|
|
|
@ -27,4 +27,4 @@
|
||||||
name: network-scripts
|
name: network-scripts
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_distribution_major_version|int == 8
|
- ansible_facts['distribution_major_version'] is version('8', '==')
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
- name: set is_bootstrap_node fact
|
- name: set is_bootstrap_node fact
|
||||||
set_fact:
|
set_fact:
|
||||||
is_bootstrap_node: "{{ tripleo_packages_short_bootstrap_node_name|lower == ansible_hostname|lower }}"
|
is_bootstrap_node: "{{ tripleo_packages_short_bootstrap_node_name|lower == ansible_facts['hostname']|lower }}"
|
||||||
|
|
||||||
- name: Debug fast forward upgrade repo variables
|
- name: Debug fast forward upgrade repo variables
|
||||||
debug:
|
debug:
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
- python3-heat-agent*
|
- python3-heat-agent*
|
||||||
state: present
|
state: present
|
||||||
when:
|
when:
|
||||||
- ansible_distribution_major_version == '8'
|
- ansible_facts['distribution_major_version'] is version('8', '==')
|
||||||
|
|
||||||
# With the layered product packaging, the key package is rhosp-openvswitch. It depends on
|
# With the layered product packaging, the key package is rhosp-openvswitch. It depends on
|
||||||
# a openvswitch package that includes the version as part of the name (e.g openvswitch2.10).
|
# a openvswitch package that includes the version as part of the name (e.g openvswitch2.10).
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
|
|
|
@ -57,12 +57,13 @@
|
||||||
- '!all'
|
- '!all'
|
||||||
- '!min'
|
- '!min'
|
||||||
- hardware
|
- hardware
|
||||||
|
filter: 'ansible_mounts'
|
||||||
|
|
||||||
- name: Un-mount docker directories
|
- name: Un-mount docker directories
|
||||||
mount:
|
mount:
|
||||||
path: "{{ item.mount }}"
|
path: "{{ item.mount }}"
|
||||||
state: unmounted
|
state: unmounted
|
||||||
loop: "{{ ansible_mounts | selectattr('mount', 'search', 'docker') | list }}"
|
loop: "{{ ansible_facts['mounts'] | selectattr('mount', 'search', 'docker') | list }}"
|
||||||
|
|
||||||
- name: Purge /var/lib/docker
|
- name: Purge /var/lib/docker
|
||||||
file:
|
file:
|
||||||
|
|
|
@ -19,12 +19,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
|
|
||||||
- name: ensure buildah is installed
|
- name: ensure buildah is installed
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -26,9 +26,9 @@
|
||||||
name: "{{ tripleo_podman_packages }}"
|
name: "{{ tripleo_podman_packages }}"
|
||||||
state: latest
|
state: latest
|
||||||
|
|
||||||
- name: Ensure we get the ansible_interfaces fact
|
- name: Ensure we get the ansible interfaces facts
|
||||||
when:
|
when:
|
||||||
- ansible_interfaces is undefined
|
- ansible_facts['interfaces'] is undefined
|
||||||
setup:
|
setup:
|
||||||
gather_subset:
|
gather_subset:
|
||||||
- '!all'
|
- '!all'
|
||||||
|
@ -39,7 +39,7 @@
|
||||||
- name: Delete legacy cni0 interface (podman < 1.6)
|
- name: Delete legacy cni0 interface (podman < 1.6)
|
||||||
command: ip link delete cni0
|
command: ip link delete cni0
|
||||||
when:
|
when:
|
||||||
- '"cni0" in ansible_interfaces'
|
- '"cni0" in ansible_facts["interfaces"]'
|
||||||
|
|
||||||
# don't update the network config if the network is already running
|
# don't update the network config if the network is already running
|
||||||
# meaning cni-podman0 is running somewhere
|
# meaning cni-podman0 is running somewhere
|
||||||
|
@ -51,8 +51,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
when:
|
when:
|
||||||
- '"cni-podman0" not in ansible_interfaces'
|
- '"cni-podman0" not in ansible_facts["interfaces"]'
|
||||||
|
|
||||||
|
|
||||||
- name: Write containers registries.conf
|
- name: Write containers registries.conf
|
||||||
template:
|
template:
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
# All variables intended for modification should be placed in this file.
|
# All variables intended for modification should be placed in this file.
|
||||||
|
|
||||||
tripleo_ptp_slave_mode: 1
|
tripleo_ptp_slave_mode: 1
|
||||||
tripleo_ptp_interfaces: ["{{ ansible_default_ipv4.interface }}"]
|
tripleo_ptp_interfaces: []
|
||||||
tripleo_ptp_transport: UDPv4
|
tripleo_ptp_transport: UDPv4
|
||||||
tripleo_ptp_hardware_offload: false
|
tripleo_ptp_hardware_offload: false
|
||||||
|
|
||||||
|
|
|
@ -23,15 +23,31 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
- name: Get default interface network facts
|
||||||
|
setup:
|
||||||
|
gather_subset:
|
||||||
|
- '!all'
|
||||||
|
- '!any'
|
||||||
|
- network
|
||||||
|
filter: 'ansible_default_ipv4'
|
||||||
|
|
||||||
|
- name: Set default ptp interface
|
||||||
|
set_fact:
|
||||||
|
tripleo_ptp_interfaces: ["{{ ansible_facts['default_ipv4']['interface'] }}"]
|
||||||
|
when:
|
||||||
|
- tripleo_ptp_interfaces | length == 0
|
||||||
|
- ansible_facts['default_ipv4'] is defined
|
||||||
|
- ansible_facts['default_ipv4']['interface'] is defined
|
||||||
|
|
||||||
- name: Run ptp tasks
|
- name: Run ptp tasks
|
||||||
include_tasks: tripleo_ptp.yml
|
include_tasks: tripleo_ptp.yml
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,6 @@
|
||||||
state: present
|
state: present
|
||||||
register: _ptp_install_result
|
register: _ptp_install_result
|
||||||
|
|
||||||
- name: Collect only facts returned by facter
|
|
||||||
setup:
|
|
||||||
gather_subset:
|
|
||||||
- '!all'
|
|
||||||
- '!any'
|
|
||||||
- network
|
|
||||||
|
|
||||||
# NOTE(cloudnull): In the future, we could potentially revisit this once the Heat
|
# NOTE(cloudnull): In the future, we could potentially revisit this once the Heat
|
||||||
# template for the "kernel" sysctl settings has been converted into
|
# template for the "kernel" sysctl settings has been converted into
|
||||||
# an Ansible role and re-use the functionality of that.
|
# an Ansible role and re-use the functionality of that.
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
when:
|
when:
|
||||||
- include_file is exists
|
- include_file is exists
|
||||||
vars:
|
vars:
|
||||||
include_file: "{{ role_path }}/vars/{{ ansible_distribution | lower }}.yml"
|
include_file: "{{ role_path }}/vars/{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
- include_tasks: enforce_release.yml
|
- include_tasks: enforce_release.yml
|
||||||
name: Enforce RHEL/OSP version pair
|
name: Enforce RHEL/OSP version pair
|
||||||
when:
|
when:
|
||||||
- (ansible_distribution | lower) == "redhat"
|
- (ansible_facts['distribution'] | lower) == "redhat"
|
||||||
- tripleo_redhat_enforce|bool
|
- tripleo_redhat_enforce|bool
|
||||||
|
|
|
@ -20,12 +20,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,12 @@
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- skip: true
|
- skip: true
|
||||||
files:
|
files:
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_major_version'] | lower }}.yml"
|
||||||
- "{{ ansible_distribution | lower }}.yml"
|
- "{{ ansible_facts['distribution'] | lower }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_version.split('.')[0] }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}-{{ ansible_facts['distribution_version'].split('.')[0] }}.yml"
|
||||||
- "{{ ansible_os_family | lower }}.yml"
|
- "{{ ansible_facts['os_family'] | lower }}.yml"
|
||||||
tags:
|
tags:
|
||||||
- always
|
- always
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue