diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml')
-rwxr-xr-x | deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml b/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml index 771fb6ab..b0be0f2e 100755 --- a/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml +++ b/deploy/adapters/ansible/roles/ceph-config/tasks/create_config.yml @@ -1,3 +1,4 @@ +--- ############################################################################## # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. # @@ -43,15 +44,19 @@ when: inventory_hostname in groups['ceph_mon'] - name: create mon.keyring - shell: "ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'" + shell: "ceph-authtool --create-keyring /tmp/ceph.mon.keyring \ + --gen-key -n mon. --cap mon 'allow *'" when: inventory_hostname in groups['ceph_adm'] - name: create admin.keyring - shell: "ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --set-uid=0 --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow'" + shell: "ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring \ + --gen-key -n client.admin --set-uid=0 \ + --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow'" when: inventory_hostname in groups['ceph_adm'] - name: Add the client.admin key to the ceph.mon.keyring - shell: "ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring" + shell: "ceph-authtool /tmp/ceph.mon.keyring \ + --import-keyring /etc/ceph/ceph.client.admin.keyring" when: inventory_hostname in groups['ceph_adm'] - name: fetch mon.keyring to local @@ -64,11 +69,17 @@ when: compute_expansion - name: fetch client.admin.keyring to local - fetch: src="/etc/ceph/ceph.client.admin.keyring" dest="/tmp/ceph.client.admin.keyring" flat=yes + fetch: + src: "/etc/ceph/ceph.client.admin.keyring" + dest: "/tmp/ceph.client.admin.keyring" + flat: "yes" when: inventory_hostname in groups['ceph_adm'] - name: fetch mon.keyring from ceph_adm - fetch: src="/etc/ceph/ceph.client.admin.keyring" dest="/tmp/ceph.client.admin.keyring" flat=yes + fetch: + src: "/etc/ceph/ceph.client.admin.keyring" + dest: "/tmp/ceph.client.admin.keyring" + flat: "yes" delegate_to: "{{ public_vip.ip }}" when: compute_expansion @@ -76,7 +87,8 @@ copy: src="/tmp/ceph.mon.keyring" dest="/tmp/ceph.mon.keyring" - name: copy admin.keyring to remote nodes - copy: src="/tmp/ceph.client.admin.keyring" dest="/etc/ceph/ceph.client.admin.keyring" - + copy: + src: "/tmp/ceph.client.admin.keyring" + dest: "/etc/ceph/ceph.client.admin.keyring" - meta: flush_handlers |