When working with tools that don't have an Ansible module/roles and only have shell commands to interact with. I find my self writing the following:
- shell: pre_check_command || command Where 'pre_check_command' exits with 0 if the outcome of 'command' already exits. Unfortunately, such usage will always output [changed]. I know I can use multiple tasks with register and chagned_when, but it feels like a lot lines for something that is common. Anyone else seeing the same pattern when working with the shell module? Perhaps an additional argument for the shell module or is there an entirely different trick that I'm not seeing? -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/15ead754-8764-4c05-8eef-b33f9079bc6an%40googlegroups.com.
