]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Revert "cephadm: use public_network when adding host"
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 28 Oct 2021 11:43:57 +0000 (13:43 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 28 Oct 2021 14:37:22 +0000 (16:37 +0200)
This reverts commit 7a12b854c47c37dbff21ce36af5bc5adc4eda68b.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/cephadm-adopt.yml
infrastructure-playbooks/cephadm.yml

index 8553d8691d406821f735f6cd23db1634fcb3dd61..23556245cd6ebc190f036f8d59d2198a645fbf07 100644 (file)
         - not containerized_deployment | bool
         - ceph_docker_registry_auth | bool
 
-    - import_role:
-        name: ceph-facts
-        tasks_from: set_monitor_address.yml
-
     - name: "pulling {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }} image"
       command: "{{ timeout_command }} {{ container_binary }} pull {{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
       changed_when: false
       when: is_hci | bool
 
     - name: manage nodes with cephadm
-      command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ _current_monitor_address }} {{ group_names | join(' ') }}"
+      command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ ansible_facts['default_ipv4']['address'] }} {{ group_names | join(' ') }}"
       changed_when: false
       delegate_to: '{{ groups[mon_group_name][0] }}'
 
index b980fd7ef4d2364be0294f554d423183786e5827..7456e4c9532f52bc571262a7a28ca67752b3bbe1 100644 (file)
     - import_role:
         name: ceph-defaults
 
-    - import_role:
-        name: ceph-facts
-        tasks_from: set_monitor_address.yml
-
     - name: get the cephadm ssh pub key
       command: "{{ cephadm_cmd }} shell -- ceph --cluster {{ cluster }} cephadm get-pub-key"
       changed_when: false
         CEPHADM_IMAGE: '{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}'
 
     - name: manage nodes with cephadm
-      command: "{{ cephadm_cmd }} shell -- ceph --cluster {{ cluster }} orch host add {{ ansible_facts['hostname'] }} {{ _current_monitor_address }} {{ group_names | join(' ') }} {{ '_admin' if mon_group_name | default('mons') in group_names else '' }}"
+      command: "{{ cephadm_cmd }} shell -- ceph --cluster {{ cluster }} orch host add {{ ansible_facts['hostname'] }} {{ ansible_facts['default_ipv4']['address'] }} {{ group_names | join(' ') }} {{ '_admin' if mon_group_name | default('mons') in group_names else '' }}"
       changed_when: false
       delegate_to: '{{ groups[mon_group_name][0] }}'
       environment: