From d9e8aa46bee1f5a3286f77e265f69c3682a88cfe Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 19 May 2015 15:05:18 -0600 Subject: [PATCH] Don't block while running the larger playbook Signed-off-by: Zack Cerza --- .../templates/triggers/install/post/cephlab_ansible.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh index f7cd76a..56452f7 100644 --- a/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh +++ b/roles/cobbler/templates/triggers/install/post/cephlab_ansible.sh @@ -18,5 +18,7 @@ export ANSIBLE_SSH_PIPELINING=1 # 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 # Now run the rest of the playbook. If it fails, at least we have access. -ansible-playbook testnodes.yml -v --limit $name* --skip-tags user,pubkeys 2>&1 >> /var/log/ansible/$name.log +# 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 +ansible-playbook testnodes.yml -v --limit $name* --skip-tags user,pubkeys 2>&1 >> /var/log/ansible/$name.log & popd -- 2.39.5