aboutsummaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-10-15 14:29:58 +0800
committergrakiss <grakiss.wanglei@huawei.com>2015-10-27 18:51:21 +0800
commit33867376480e636e9854d27b3e2443127936dd01 (patch)
treedd618ee041c3e936eaf8113e477691a84d6173a0 /deploy
parent7a591773b61e1a512bf6d0984630c7a8ec5865af (diff)
support repeatly create secret key for ceph deploy
JIRA: COMPASS-101 - undefine libvirt secret before creating new one Change-Id: Ideb68cfbb31a6cddfcb15c7b15aa762e5632f8da Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_openstack_pre.yml13
1 files changed, 11 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_openstack_pre.yml b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_openstack_pre.yml
index 52e54cbe..d0ee7e2e 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_openstack_pre.yml
+++ b/deploy/adapters/ansible/roles/ceph-deploy/tasks/ceph_openstack_pre.yml
@@ -1,7 +1,7 @@
---
- name: create pool
- shell: ceph osd pool create {{ item }} 80
+ shell: ceph osd pool create {{ item }} 50
with_items:
- volumes
- images
@@ -48,8 +48,17 @@
tags:
- ceph_copy_secret
+- name: undefine libvirt secret in case of repeatedly execute ceph_deploy
+ shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "virsh secret-list | awk '\$1 ~ /[0-9]+/ {print \$1}' | xargs virsh secret-undefine"
+ with_items:
+ - "{{ groups['compute'] }}"
+ tags:
+ - ceph_copy_secret
+ ignore_errors: True
+
+
- name: create key for libvirt on compute nodes
- shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "virsh secret-define --file secret.xml && virsh secret-set-value --secret {{ ceph_uuid.stdout_lines[0] }} --base64 \$(cat client.cinder.key) && rm client.cinder.key secret.xml"
+ shell: ssh -o StrictHostKeyChecking=no -t {{ item }} "virsh secret-define --file secret.xml && virsh secret-set-value --secret {{ ceph_uuid.stdout_lines[0] }} --base64 $(cat client.cinder.key)"
with_items:
- "{{ groups['compute'] }}"
tags: