Re: [ansible-devel] how to run command that cannot create files?

2022-11-09 Thread Philipp Ewald
- shell: cmd: do_something && touch /etc/do_something/done creates: /etc/do_something_done This is the best solution. But why does i need to ask the Mailing list do get this? why ansible cant do this by itself? or why is this solution not in documentation? Otherwise, do a task

Re: [ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Brian Coca
Also, if the built in command does not do exactly what you want, you are free to create your own custom version, it just not make sense for this in the core offering. -- -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Development"

Re: [ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Brian Coca
Tracking files that are not the normal side effect of a command are a poor way to track if a command was executed, the best way is to track the expected side effect of such a command (creates/removes does this by assuming those files are created/removed by the command's execution). There are other

Re: [ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Matt Martz
- shell: cmd: do_something && touch /etc/do_something/done creates: /etc/do_something_done Easy peasy. This was recommended before, although no one explicitly wrote it out. Otherwise, do a task before, to actually evaluate whether you need to run the command in the first place, instead

Re: [ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Philipp Ewald
:) try this to explain new employees :D you need to place a file there, otherwise the command will be execute again :D for me this is a bug but ok i will do it with extra steps if everyone else is happy with that solution, i'm fine with that Am 08.11.22 um 18:01 schrieb Tom Davison:

Re: [ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Tom Davison
The ansible file module? https://docs.ansible.com/ansible/latest/collections/ansible/builtin/file_module.html On Tue, Nov 8, 2022 at 10:55 Philipp Ewald wrote: > I dont want to create a script placing files or removing files just to > run one command... > > any ideas? > > > -- > Philipp

[ansible-devel] how to run command that cannot create files?

2022-11-08 Thread Philipp Ewald
I dont want to create a script placing files or removing files just to run one command... any ideas? -- Philipp Ewald Administrator -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop