]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Convert interface names to underscores
authorToprHarley <tpetr@redhat.com>
Mon, 18 Feb 2019 18:02:03 +0000 (19:02 +0100)
committermergify[bot] <mergify[bot]@users.noreply.github.com>
Thu, 28 Feb 2019 19:02:32 +0000 (19:02 +0000)
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1540881
Signed-off-by: Tomas Petr <tpetr@redhat.com>
(cherry picked from commit 573adce7dd4f306c384b3308c8049ae49ef59716)

roles/ceph-validate/tasks/check_eth_mon.yml
roles/ceph-validate/tasks/check_eth_rgw.yml

index cb800c29063b3ab4152f69da2c36911a04803c05..ce42be48b553568daceb28f4202c88626131f1cc 100644 (file)
@@ -9,18 +9,18 @@
   fail:
     msg: "{{ monitor_interface }} is not active on {{ inventory_hostname }}"
   when:
-    - not hostvars[inventory_hostname]['ansible_' + monitor_interface]['active']
+    - not hostvars[inventory_hostname]['ansible_' + (monitor_interface | replace('-', '_'))]['active']
 
 - name: "fail if {{ monitor_interface }} does not have any ip v4 address on {{ inventory_hostname }}"
   fail:
     msg: "{{ monitor_interface }} does not have any IPv4 address on {{ inventory_hostname }}"
   when:
     - ip_version == "ipv4"
-    - hostvars[inventory_hostname]['ansible_' + monitor_interface]['ipv4'] is not defined
+    - hostvars[inventory_hostname]['ansible_' + (monitor_interface | replace('-', '_'))]['ipv4'] is not defined
 
 - name: "fail if {{ monitor_interface }} does not have any ip v6 address on {{ inventory_hostname }}"
   fail:
     msg: "{{ monitor_interface }} does not have any IPv6 address on {{ inventory_hostname }}"
   when:
     - ip_version == "ipv6"
-    - hostvars[inventory_hostname]['ansible_' + monitor_interface]['ipv6'] is not defined
\ No newline at end of file
+    - hostvars[inventory_hostname]['ansible_' + (monitor_interface | replace('-', '_'))]['ipv6'] is not defined
index 987eb8ebe7b8510f181105574af2f2f96c8f08bd..d9fff48605998077e651b0d30a75d3cd59a6e487 100644 (file)
@@ -9,18 +9,18 @@
   fail:
     msg: "{{ radosgw_interface }} is not active on {{ inventory_hostname }}"
   when:
-    - hostvars[inventory_hostname]['ansible_' + radosgw_interface]['active'] == "false"
+    - hostvars[inventory_hostname]['ansible_' + (radosgw_interface | replace('-', '_'))]['active'] == "false"
 
 - name: "fail if {{ radosgw_interface }} does not have any ip v4 address on {{ inventory_hostname }}"
   fail:
     msg: "{{ radosgw_interface }} does not have any IPv4 address on {{ inventory_hostname }}"
   when:
     - ip_version == "ipv4"
-    - hostvars[inventory_hostname]['ansible_' + radosgw_interface]['ipv4'] is not defined
+    - hostvars[inventory_hostname]['ansible_' + (radosgw_interface | replace('-', '_'))]['ipv4'] is not defined
 
 - name: "fail if {{ radosgw_interface }} does not have any ip v6 address on {{ inventory_hostname }}"
   fail:
     msg: "{{ radosgw_interface }} does not have any IPv6 address on {{ inventory_hostname }}"
   when:
     - ip_version == "ipv6"
-    - hostvars[inventory_hostname]['ansible_' + radosgw_interface]['ipv6'] is not defined
\ No newline at end of file
+    - hostvars[inventory_hostname]['ansible_' + (radosgw_interface | replace('-', '_'))]['ipv6'] is not defined