From 92f6ca7bb6d7b2f295406aab34094b1dba76ff94 Mon Sep 17 00:00:00 2001 From: liyuenan Date: Tue, 27 Dec 2016 17:44:34 +0800 Subject: Yamllint test JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan --- .../roles/ceph-config/tasks/create_config.yml | 26 ++++++++++++++++------ .../ansible/roles/ceph-config/tasks/main.yml | 1 + 2 files changed, 20 insertions(+), 7 deletions(-) (limited to 'deploy/adapters/ansible/roles/ceph-config/tasks') 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 diff --git a/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml b/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml index dbe9fea5..49feab61 100755 --- a/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml +++ b/deploy/adapters/ansible/roles/ceph-config/tasks/main.yml @@ -1,3 +1,4 @@ +--- ############################################################################## # Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others. # -- cgit 1.2.3-korg