From: David Galloway Date: Fri, 4 Mar 2016 19:01:27 +0000 (-0500) Subject: cobbler: enable stock OS provisioning X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F206%2Fhead;p=ceph-cm-ansible.git cobbler: enable stock OS provisioning http://tracker.ceph.com/issues/14725 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 f1cee1c5..3889bcf9 100644 --- a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh +++ b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh @@ -2,6 +2,7 @@ ## {{ ansible_managed }} set -ex name=$2 +profile=$(cobbler system dumpvars --name $2 | grep profile_name | cut -d ':' -f2) export USER=root export HOME=/root ANSIBLE_CM_PATH=/root/ceph-cm-ansible @@ -30,5 +31,11 @@ ansible-playbook testnodes.yml -v --limit $name* --tags user,pubkeys 2>&1 > /var # 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 + +# Skip the rest of the testnodes playbook if stock profile requested +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 & popd