- name: 'MyPlay | Fire and Forget'
command: "/opt/PROGRAM/bin/gremlin -e /opt/PROGRAM/scripts/load_graph.grm ..."
async: 1000
poll: 0
register: load_graph_async
- name: 'MyPlay | Check Job'
async_status: jid={{ load_graph_async.ansible_job_id }}
register: job_result
until: job_result.finished
retries: 30TASK: [MyPlay | Fire and forget] *************************
<job 759951815367.27671> finished on Host1
TASK: [MyPlay | Check Job] *************************************
fatal: [Host1] => error while evaluating conditional: job_result.finished job 759951815367.27671root 27674 0.0 0.0 136548 3672 ? S 21:15 0:00 /usr/bin/python /home/USER/.ansible/tmp/ansible-tmp-1419020105.57-13577669747697/async_wrapper 759951815367 1000 /home/USER/.ansibl
root 27675 0.0 0.0 136548 3900 ? S 21:15 0:00 \_ /usr/bin/python /home/USER/.ansible/tmp/ansible-tmp-1419020105.57-13577669747697/async_wrapper 759951815367 1000 /home/USER/.an
root 27676 0.1 0.0 138008 7320 ? S 21:15 0:00 \_ /usr/bin/python /home/USER/.ansible/tmp/ansible-tmp-1419020105.57-13577669747697/command /home/USER/.ansible/tmp/ansible-tm
root 27677 0.0 0.0 115504 1544 ? S 21:15 0:00 \_ /bin/bash /opt/PROGRAM/bin/gremlin -e /opt/PROGRAM/scripts/load_graph.grm ...
root 27727 84.0 14.4 4875920 1187256 ? Sl 21:15 0:21 \_ /usr/lib/jvm/java-7-oracle/bin/java -server -Xms4g -Xmx4g -cp /opt/PROGRAM/conf:/opt/PROGRAMTo view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAA_4i2EGV9fBrwCS3HeN8eoQ_7Axe7Cj-ZTYcnFhkjX-RPJcKg%40mail.gmail.com.
$ pip install Ansible
$ pip list
ansible (1.8.2)
ecdsa (0.11)
Jinja2 (2.7.3)
MarkupSafe (0.23)
paramiko (1.15.2)
pip (1.5.6)
pycrypto (2.6.1)
PyYAML (3.11)
setuptools (3.6)
wsgiref (0.1.2)$ ansible-playbook -i inventories/demo playbooks/run/load-graph.yml
PLAY [VNG-Bootstrap | create-graph] *******************************************
GATHERING FACTS ***************************************************************
ok: [Host1]
Host1: importing ../../../vars/demo.yml
TASK: [Creating Titan graph schema] ***************************
changed: [Host1]
TASK: [Loading data into Titan graph] *************************
<job 356642401411.12344> finished on Host1
TASK: [Check Loading data Status] *****************************
fatal: [Host1] => error while evaluating conditional: load_graph_result.finished
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/Users/USER/create-load-graph.retry
Host1 : ok=10 changed=2 unreachable=1 failed=0 diff --git a/deployment/ansible/playbooks/run/create-load-graph.yml b/deployment/ansible/'playbooks/run/create-load-graph.yml'
index 86a4fac..246f820 100644
--- a/deployment/ansible/playbooks/run/create-load-graph.yml
+++ b/deployment/ansible/playbooks/run/create-load-graph.yml
@@ -38,8 +38,15 @@
- async: 14400
- poll: 60
+ async: 1000
+ poll: 0
+ register: load_graph
+
+ - name: 'Check Loading data Status'
+ async_status: jiid={{ load_graph.ansible_job_id }}
+ register: load_graph_result
+ until: load_graph_result.finished
+ retries: 60