]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
cobbler: zap disks after cobbler reimage
authorDavid Galloway <dgallowa@redhat.com>
Thu, 17 Nov 2016 19:05:48 +0000 (14:05 -0500)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 17 Nov 2016 20:34:19 +0000 (15:34 -0500)
Added to first line to make sure it's run when using -stock profiles

Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh

index 23bd33d225254052d86601344a871ac6281f4438..c7352078f41eaba6b6dc06c35461cf5fc08970ae 100644 (file)
@@ -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