Hi.  I'm trying to implement an ad-hoc "restart" functionality in Ansible 
Tower similar to what is in the core Ansible CLI.  My idea is that, if a 
deployment fails, I can restart it at the tag that it failed at--however, 
if I specify this tag in the deployment, it will ONLY run that tag.  I am 
looking for a way such the deployment will *start* running at that specific 
tag and then continue to all of the subsequent tasks.

I can see one potential method whereby tags are added sequentially with 
each task.  For instance,

 * - name: First task*
*            shell: echo "Kilroy Was Here" > /home/mgoldsb/Hello.txt*
*            failed_when: "{{ First }} == true"*
*            tags:*
*              - First_Task*
                
*          - name: Second task*
*            shell: echo "Kilroy Was Here" > /home/mgoldsb/World.txt*
*            failed_when: "{{ Second }} == true"*
*            tags:*
*              - First_Task*
*              - Second_Task*
                
*          - name: Third task*
*            #shell: echo "Kilroy Was Here" > /home/mgoldsb/Hows.txt*
*            shell: rm -f testthis.txt*
*            failed_when: "{{ Third }} == true"*

*            tags:              - First_Task*
*              - Second_Task*
*              - Third_Task*
                
*          - name: Fourth task*
*            shell: echo "Kilroy Was Here" > /home/mgoldsb/It.txt*
*            failed_when: "{{ Fourth }} == true"*

*            tags:              - First_Task*
*              - Second_Task*
*              - Third_Task*
*              - Fourth_Task*
                
*          - name: Fifth task*
*            shell: echo "Kilroy Was Here" > /home/mgoldsb/Going.txt*
*            failed_when: "{{ Fifth }} == true"*

*            tags:              - First_Task*
*              - Second_Task*
*              - Third_Task*
*              - Fourth_Task*
*              - First_Task*

However, I would much rather prefer only having a single tag for each task 
that uniquely refers to that task.

Can anyone offer any suggestions?

Thanks in advance.

-- 
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/ba4b8931-0ece-47e8-a0a8-f18c6054d757%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to