Between my lack of Ansible mastery and its kind of syntax, rare is the day 
I don't get stuck...  
 
Either the syntax is not intuitive or I have no intuition.  
 
I am trying to do something very simple and it seems very complicated in 
Ansible.  I hope it just seems so.  
 
I  figure out what release to deploy in a play and then confirm the release 
is correct, if not all stops, if correct run with the wind... 
 
So:
 
If I put vars_prompt between the tasks it gives an error.   Where can the 
prompt go then?    When is code position indicative of order of execution 
and when not?  
 

---
 
hosts: appserver
 
tasks:
 
- name: Get the latest release.

   local_action: shell grep XXX  /tmp/releases | cut -f2 -d':' | tr -d "," | 
tr -d "'"

   register: rel

--->>><  "Deploying release {{ rel.stdout }} Correct?  (y/n): "  > prompt 
goes here  <<< ----   

- name: Remove old installation files.

  script: /tmp/clean.sh "{{ rel.stdout }}"
 
- name: Run local build.

  local_action: shell /tmp/build.py "{{ inventory_hostname }}" "{{ 
rel.stdout }}"
 
- name: Run deploy.py on target.

script: /export/home/jsuriol/deploy/migration/apps/TV2G/tools/deploy.py "{{ 
rel.stdout }}"

Thank you for your patience with neophites...  

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1bbaf9f6-56df-41fa-b3fb-c78faa2d980b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to