Is that possible to set conditions for a single option of the ansible module.
Using set_fact we can set condition aand use that variable in the ansible module. Alternatively is there any other option to set the condition using if loop in jinja or something like that.
E.g:
- name: Simple PUT operation
s3:
bucket: mybucket
object: /my/desired/key.txt
src: /usr/local/myfile.txt
mode: put
I want to add s3_url option if it satifies the condition sample_var= myapp.If it doesnot satify it wont have to add s3_url
- name: Simple PUT operation
s3:
bucket: mybucket
object: /my/desired/key.txt
src: /usr/local/myfile.txt
mode: put
s3_url: "s3my url"------if it satisfies sample_var=myapp
How can i use jinja here when it satisfies my condition it needs to add this option to the ansible module?
Thanks in advance..