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