]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume/tests: use ansible_facts 42491/head
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 22 Jul 2021 13:58:03 +0000 (09:58 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Mon, 26 Jul 2021 17:39:00 +0000 (13:39 -0400)
Since inject_facts_as_vars is set to false in the ansible.cfg file then we
have to update the references to use ansible_facts[<thing>] instead of
ansible_<thing>.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 842fc2b605a2321a031a240c4aa4348c1be24e14)

src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml

index 0c1d13f8f1a2f8116d00e2a16043b80a9e354454..e5185e3fcdfc7d85ce4abfe0b0fe2da323a0494f 100644 (file)
@@ -75,8 +75,8 @@
     - name: install required packages for fedora > 23
       raw: sudo dnf -y install python2-dnf libselinux-python ntp
       when:
-        - ansible_distribution == 'Fedora'
-        - ansible_distribution_major_version|int >= 23
+        - ansible_facts['distribution'] == 'Fedora'
+        - ansible_facts['distribution_major_version']|int >= 23
 
     - name: check if it is atomic host
       stat:
         dest: "/usr/lib/python3.6/site-packages"
         use_ssh_args: true
       when:
-        - ansible_os_family == "RedHat"
+        - ansible_facts['os_family'] == "RedHat"
         - inventory_hostname in groups.get(osd_group_name, [])
 
     - name: rsync ceph-volume to test nodes on ubuntu
         dest: "/usr/lib/python2.7/dist-packages"
         use_ssh_args: true
       when:
-        - ansible_os_family == "Debian"
+        - ansible_facts['os_family'] == "Debian"
         - inventory_hostname in groups.get(osd_group_name, [])
 
     - name: run ceph-config role