From 48dd6a3cd972625820a81e4c180a652ed11d7b5a Mon Sep 17 00:00:00 2001 From: David Galloway Date: Fri, 4 Mar 2016 14:01:27 -0500 Subject: [PATCH] cobbler: enable stock OS provisioning http://tracker.ceph.com/issues/14725 Signed-off-by: David Galloway --- .../templates/triggers/install/post/cephlab_ansible.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.47.3