-
-
Save hkumarmk/b35847b25b16053968deeeb9d2fc607b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: localhost | |
| vars: | |
| qs: [ | |
| {'hardware_q_id': '1', 'logical_queue':['1', '6-10', '12-15']}, | |
| {'hardware_q_id': '2', 'logical_queue':['2-5']}, | |
| {'hardware_q_id': '3', 'logical_queue':['7'], 'default': 'True'}] | |
| q: {} | |
| tasks: | |
| - set_fact: | |
| q: "{{ q|combine({'QUEUE-' + item.hardware_q_id: {'logical_queue': item.logical_queue}})}}" | |
| with_items: "{{ qs }}" | |
| - debug: msg="{{ q }}" | |
| - ini_file: dest=/tmp/file.ini section="{{ item.section }}" option="{{ item.option }}" value="{{ item.value }}" create=yes | |
| with_inidata: "{{ q }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment