diff --git a/roles/ceph-mds/tasks/containerized.yml b/roles/ceph-mds/tasks/containerized.yml index e10725a46..08c4b0e79 100644 --- a/roles/ceph-mds/tasks/containerized.yml +++ b/roles/ceph-mds/tasks/containerized.yml @@ -1,8 +1,4 @@ --- -- name: set_fact container_exec_cmd mds - set_fact: - container_exec_cmd: "{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}" - - name: include_tasks systemd.yml include_tasks: systemd.yml @@ -15,7 +11,7 @@ daemon_reload: yes - name: wait for mds socket to exist - command: "{{ container_exec_cmd }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_fqdn }}.asok'" + command: "{{ container_binary }} exec ceph-mds-{{ ansible_hostname }} sh -c 'stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_hostname }}.asok || stat /var/run/ceph/{{ cluster }}-mds.{{ ansible_fqdn }}.asok'" changed_when: false register: multi_mds_socket retries: 5 diff --git a/roles/ceph-mds/tasks/main.yml b/roles/ceph-mds/tasks/main.yml index a53759730..f6ff200f3 100644 --- a/roles/ceph-mds/tasks/main.yml +++ b/roles/ceph-mds/tasks/main.yml @@ -5,11 +5,6 @@ - inventory_hostname == groups[mds_group_name] | first - not rolling_update | bool -- name: set_fact container_exec_cmd - set_fact: - container_exec_cmd: "{{ container_binary }} exec ceph-mds-{{ ansible_hostname }}" - when: containerized_deployment | bool - - name: include common.yml include_tasks: common.yml diff --git a/roles/ceph-nfs/tasks/pre_requisite_container.yml b/roles/ceph-nfs/tasks/pre_requisite_container.yml index 1cda5ef25..2c96d6523 100644 --- a/roles/ceph-nfs/tasks/pre_requisite_container.yml +++ b/roles/ceph-nfs/tasks/pre_requisite_container.yml @@ -2,7 +2,7 @@ - name: keyring related tasks block: - name: get keys from monitors - command: "{{ hostvars[groups.get(mon_group_name)[0]]['container_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} auth get {{ item.name }}" + command: "{{ hostvars[groups.get(mon_group_name)[0]]['container_exec_cmd'] }} ceph --cluster {{ cluster }} auth get {{ item.name }}" register: _rgw_keys with_items: - { name: "client.bootstrap-rgw", path: "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring", copy_key: true } diff --git a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml index 0c497f6a9..c85e4e018 100644 --- a/roles/ceph-nfs/tasks/pre_requisite_non_container.yml +++ b/roles/ceph-nfs/tasks/pre_requisite_non_container.yml @@ -47,7 +47,7 @@ - groups.get(mon_group_name, []) | length > 0 block: - name: get keys from monitors - command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} auth get {{ item.name }}" + command: "ceph --cluster {{ cluster }} auth get {{ item.name }}" register: _rgw_keys with_items: - { name: "client.bootstrap-rgw", path: "/var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring", copy_key: true }