Hi all,

our general setup is based on the idea to have an ansible environment with 
roles and vars and everything, that can be used
both by command line and also programatically from python. It was quite 
easy with ansible 1.9, but i struggle to get it with
newer ansible 2.0.
Here is the point, i can't get fixed:

In python:

*from ansible.cli.playbook import **
*from ansible.executor.playbook_executor import **
*from ansible.utils.vars import combine_vars*

*my_cli=PlaybookCLI(['', 
'/amplay/reboot.yml','-i','/amplay/hosts','-l','nuc5'])*
*my_cli.parse()*
*results=my_cli.run()*


Output:

*PLAY [Start Protected] 
**********************************************************

*TASK [twist-protected : include] 
************************************************
*included: /amplay/roles/twist-protected/tasks/start-protected.yml for nuc5*

*TASK [twist-protected : Workaround delegate_to user name problem] 
***************
*ok: [nuc5]*

*TASK [twist-protected : Check Twistprotected] 
***********************************
*ok: [nuc5 -> localhost]*

*.....*


Now i run the same code a second time:


*my_cli=PlaybookCLI(['', 
'/amplay/reboot.yml','-i','/amplay/hosts','-l','nuc5'])*
*my_cli.parse()*
*results=my_cli.run()*


Output:

*PLAY [Start Protected] 
**********************************************************

*TASK [twist-protected : include] 
************************************************
*included: /amplay/roles/twist-protected/tasks/start-protected.yml for nuc5*

*TASK [twist-protected : include] 
************************************************
*included: /amplay/roles/twist-protected/tasks/setup-proxy.yml for nuc5*

*.....*


It does not execute the tasks, but just skips without any message!
Apparently there is some caching or similar, that tells ansible not to 
repeat the execution of the playbook.
This might make sense for some scenarios, but how can i switch it off? I 
tried with `flush-cache` cmd line
option, but that didn't change anything.

Any hints?


-- 
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/2b63c39e-29d5-4d3d-87b6-02e8f1654a46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to