diff --git a/roles/ceph-mon/tasks/create_mds_filesystems.yml b/roles/ceph-mon/tasks/create_mds_filesystems.yml index 6e7b82d98..29bdb8efa 100644 --- a/roles/ceph-mon/tasks/create_mds_filesystems.yml +++ b/roles/ceph-mon/tasks/create_mds_filesystems.yml @@ -15,14 +15,11 @@ register: check_existing_cephfs changed_when: false failed_when: false - when: inventory_hostname == groups.mons|last - name: create ceph filesystem command: ceph --cluster {{ cluster }} fs new {{ cephfs }} {{ cephfs_metadata }} {{ cephfs_data }} changed_when: false - when: - - inventory_hostname == groups.mons|last - - check_existing_cephfs.rc != 0 + when: check_existing_cephfs.rc != 0 - name: allow multimds command: ceph --cluster {{ cluster }} fs set {{ cephfs }} allow_multimds true --yes-i-really-mean-it diff --git a/roles/ceph-mon/tasks/main.yml b/roles/ceph-mon/tasks/main.yml index cf3d1f40f..9d7c5c81a 100644 --- a/roles/ceph-mon/tasks/main.yml +++ b/roles/ceph-mon/tasks/main.yml @@ -15,6 +15,7 @@ - not mon_containerized_deployment - groups[mds_group_name] is defined - "{{ groups[mds_group_name]|length > 0 }}" + - inventory_hostname == groups.mons|last - include: secure_cluster.yml when: