From: David Galloway Date: Thu, 17 Nov 2016 19:05:48 +0000 (-0500) Subject: cobbler: zap disks after cobbler reimage X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=655117570155958ac697ed4ff8eaab28418ddb25;p=ceph-cm-ansible.git cobbler: zap disks after cobbler reimage Added to first line to make sure it's run when using -stock profiles Signed-off-by: David Galloway --- diff --git a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh index 23bd33d..c735207 100644 --- a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh +++ b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh @@ -26,8 +26,8 @@ pushd $ANSIBLE_CM_PATH flock --close ./.lock git pull export ANSIBLE_SSH_PIPELINING=1 export ANSIBLE_HOST_KEY_CHECKING=False -# Tell ansible to create users and populate authorized_keys -ansible-playbook testnodes.yml -v --limit $name* --tags user,pubkeys 2>&1 > /var/log/ansible/$name.log +# Tell ansible to create users, populate authorized_keys, and zap non-root disks +ansible-playbook testnodes.yml -v --limit $name* --tags user,pubkeys,zap 2>&1 > /var/log/ansible/$name.log # Now run the rest of the playbook. If it fails, at least we have access. # Background it so that the request doesn't block for this part and end up # causing the client to retry, thus spawning this trigger multiple times @@ -37,5 +37,5 @@ if [[ $profile == *"-stock" ]] then exit 0 fi -ansible-playbook testnodes.yml -v --limit $name* --skip-tags user,pubkeys 2>&1 >> /var/log/ansible/$name.log & +ansible-playbook testnodes.yml -v --limit $name* --skip-tags user,pubkeys,zap 2>&1 >> /var/log/ansible/$name.log & popd