diff --git a/roles/ceph-facts/tasks/facts.yml b/roles/ceph-facts/tasks/facts.yml index ea04eef1b..36124378c 100644 --- a/roles/ceph-facts/tasks/facts.yml +++ b/roles/ceph-facts/tasks/facts.yml @@ -180,39 +180,6 @@ import_tasks: devices.yml when: inventory_hostname in groups.get(osd_group_name, []) -- name: backward compatibility tasks related - when: - - (inventory_hostname in groups.get(rgw_group_name, []) or inventory_hostname in groups.get(nfs_group_name, [])) - - groups.get(mon_group_name, []) | length > 0 - block: - - name: get ceph current status - command: "{{ timeout_command }} {{ _container_exec_cmd | default('') }} ceph --cluster {{ cluster }} service dump -f json" - changed_when: false - failed_when: false - check_mode: no - register: ceph_current_status - run_once: true - delegate_to: "{{ groups[mon_group_name][0] if running_mon is undefined else running_mon }}" - - - name: set_fact ceph_current_status - set_fact: - ceph_current_status: "{{ ceph_current_status.stdout | from_json }}" - run_once: true - when: ceph_current_status.rc == 0 - - - name: set_fact rgw_hostname - set_fact: - rgw_hostname: "{% set _value = ansible_facts['hostname'] -%} - {% for key in (ceph_current_status['services']['rgw']['daemons'] | list) -%} - {% if key == ansible_facts['fqdn'] -%} - {% set _value = key -%} - {% endif -%} - {% endfor -%} - {{ _value }}" - when: - - ceph_current_status['services'] is defined - - ceph_current_status['services']['rgw'] is defined - - name: check if the ceph conf exists stat: path: '/etc/ceph/{{ cluster }}.conf' diff --git a/roles/ceph-nfs/tasks/main.yml b/roles/ceph-nfs/tasks/main.yml index 624d97644..f742e486e 100644 --- a/roles/ceph-nfs/tasks/main.yml +++ b/roles/ceph-nfs/tasks/main.yml @@ -17,7 +17,7 @@ - name: set_fact _rgw_hostname set_fact: - _rgw_hostname: "{{ hostvars[inventory_hostname]['rgw_hostname'] | default(hostvars[inventory_hostname]['ansible_facts']['hostname']) }}" + _rgw_hostname: "{{ hostvars[inventory_hostname]['ansible_facts']['hostname'] }}" - name: set rgw parameter (log file) ceph_config: diff --git a/roles/ceph-rgw/tasks/pre_requisite.yml b/roles/ceph-rgw/tasks/pre_requisite.yml index 41cae3488..11a49f763 100644 --- a/roles/ceph-rgw/tasks/pre_requisite.yml +++ b/roles/ceph-rgw/tasks/pre_requisite.yml @@ -1,7 +1,7 @@ --- - name: set_fact _rgw_hostname set_fact: - _rgw_hostname: "{{ hostvars[inventory_hostname]['rgw_hostname'] | default(hostvars[inventory_hostname]['ansible_facts']['hostname']) }}" + _rgw_hostname: "{{ hostvars[inventory_hostname]['ansible_facts']['hostname'] }}" - name: set rgw parameter (log file) ceph_config: