Hello everyone,

I'm trying to create a role to manage backup with this script: 
https://github.com/redhat-cip/simple_ec2_snapshot

I would like to take in parameter a tags list (for example), then create a 
cron with the right command line.

How to iterate over the list and construct my command for my cron line 
please ?

For example, having :
tags:
  - { key: Name, value: test }
  - { key: env, value: prod }

And generate something like :
- cron: name="check dirs" minute="0" hour="5,2" job="simplec2snap.py {{ 
tags_loop }}" => job= "simplec2snap.py -t Name test -t env prod"

Thanks for giving me a clue ;-)

Cheers

-- 
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/b9d568a2-6b7b-4dc6-a503-32f760680c8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to