Browse Source

Merge pull request #5396 from abutcher/etcd-migrate-openshift-ip

Use openshift.common.ip rather than ansible_default_ipv4 in etcd migration playbook.
Scott Dodson 7 years ago
parent
commit
d37a39d825
1 changed files with 3 additions and 3 deletions
  1. 3 3
      playbooks/common/openshift-etcd/migrate.yml

+ 3 - 3
playbooks/common/openshift-etcd/migrate.yml

@@ -69,7 +69,7 @@
   - role: etcd_migrate
     r_etcd_migrate_action: migrate
     r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
-    etcd_peer: "{{ ansible_default_ipv4.address }}"
+    etcd_peer: "{{ openshift.common.ip }}"
     etcd_url_scheme: "https"
     etcd_peer_url_scheme: "https"
 
@@ -80,7 +80,7 @@
   - role: etcd_migrate
     r_etcd_migrate_action: clean_data
     r_etcd_common_embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
-    etcd_peer: "{{ ansible_default_ipv4.address }}"
+    etcd_peer: "{{ openshift.common.ip }}"
     etcd_url_scheme: "https"
     etcd_peer_url_scheme: "https"
   post_tasks:
@@ -115,7 +115,7 @@
   roles:
   - role: etcd_migrate
     r_etcd_migrate_action: add_ttls
-    etcd_peer: "{{ hostvars[groups.oo_etcd_to_migrate.0].ansible_default_ipv4.address }}"
+    etcd_peer: "{{ hostvars[groups.oo_etcd_to_migrate.0].openshift.common.ip }}"
     etcd_url_scheme: "https"
     etcd_peer_url_scheme: "https"
     when: etcd_migration_failed | length == 0