summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2015-10-29 02:21:06 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-10-29 02:21:06 +0000
commit1bc91b12d46bcb82916e6bc237f92fe995307bee (patch)
tree45260df4ad04579ec438fb69a3627c9beb58b292
parent5d0f138cdbbd5459984c41eaa05dfaa7c074167e (diff)
parent33867376480e636e9854d27b3e2443127936dd01 (diff)
Merge "support repeatly create secret key for ceph 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: