diff --git a/ansible/roles/ceph/tasks/bootstrap_mons.yml b/ansible/roles/ceph/tasks/bootstrap_mons.yml index 8630694852..2200c4f988 100644 --- a/ansible/roles/ceph/tasks/bootstrap_mons.yml +++ b/ansible/roles/ceph/tasks/bootstrap_mons.yml @@ -19,7 +19,7 @@ register: ceph_mon_config_volume - name: Writing hostname of host with existing cluster files to temp file - local_action: copy content={{ ansible_hostname }} dest=/tmp/kolla_ceph_cluster mode=0600 + local_action: copy content="{{ inventory_hostname }}" dest=/tmp/kolla_ceph_cluster mode=0600 changed_when: False always_run: True when: not ceph_mon_config_volume.changed diff --git a/ansible/roles/ceph/tasks/generate_cluster.yml b/ansible/roles/ceph/tasks/generate_cluster.yml index 77ac8dc94f..beb78e5876 100644 --- a/ansible/roles/ceph/tasks/generate_cluster.yml +++ b/ansible/roles/ceph/tasks/generate_cluster.yml @@ -25,4 +25,4 @@ - name: Setting host for cluster files set_fact: - delegate_host: "{{ ansible_hostname }}" + delegate_host: "{{ inventory_hostname }}"