Convert remaining ansible_ fact variables to ansible_facts[]

Change-Id: I6909d6e91eb2211c1015625fee4f39c34189dc69
This commit is contained in:
Jonathan Rosser 2021-03-17 08:35:47 +00:00
parent 67191fb74d
commit 3f07f8ad90
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@
- lxc_container_list.stdout is search("container3\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3},\s+)*10.100.100.4(,\s+\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})*\s+")
- name: Check for the presence of the right app armor profile for container1
command: "grep \"^lxc.apparmor.profile = {{ (hostvars[physical_host | default('localhost')]['ansible_distribution'] == 'Debian') | ternary('unconfined', 'lxc-openstack') }}$\" {{ item }}"
command: "grep \"^lxc.apparmor.profile = {{ (hostvars[physical_host | default('localhost')]['ansible_facts']['distribution'] == 'Debian') | ternary('unconfined', 'lxc-openstack') }}$\" {{ item }}"
register: container_profile
failed_when: container_profile.rc != 0
with_sequence: start=1 end=3 format=/var/lib/lxc/container%x/config

View File

@ -22,7 +22,7 @@
- block:
- name: Install ZFS packages
package:
name: "{{ zfs_package[ansible_distribution | lower] }}"
name: "{{ zfs_package[ansible_facts['distribution'] | lower] }}"
state: present
- name: Create base directories