]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
facts: remove legacy tasks
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 13 Feb 2024 15:01:38 +0000 (16:01 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 14 Feb 2024 08:54:13 +0000 (09:54 +0100)
these tasks were there only for backward compatibility concerns.
It's time to drop them.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
roles/ceph-facts/tasks/facts.yml
roles/ceph-nfs/tasks/main.yml
roles/ceph-rgw/tasks/pre_requisite.yml

index ea04eef1b9a12584cffbc4d50ea462546bb919bb..36124378cf90d6e77b00ee9043cdc7c2672da072 100644 (file)
   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'
index 624d9764484dd30584f030fd1c5e38df4114bcde..f742e486e807b41201b4b0ff012f224caeb15f7d 100644 (file)
@@ -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:
index 41cae3488bd19b804599324846e96d836543c984..11a49f763f3120826111cdafc4899f86e4a29bdf 100644 (file)
@@ -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: