Created
March 29, 2014 12:53
-
-
Save VerosK/9853931 to your computer and use it in GitHub Desktop.
Ansible: Broke string to list
This file contains 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: | |
facter_blockdevices: sda,sdb,sdc,sdd,sde,sdf | |
gather_facts: no | |
tasks: | |
- name: Separate facts | |
set_fact: blockdevices="{{facter_blockdevices.split(',')}}" | |
- name: Show the devices | |
shell: echo {{ item }} | |
with_items: blockdevices |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for the useful information