Use native YAML (#3440)

* Use native YAML

* Add comment on quotes and column
This commit is contained in:
Fabio Alessandro Locati 2016-11-30 17:11:21 +00:00 committed by Matt Clay
parent 1f32d68310
commit aef588f3a3

View file

@ -73,12 +73,20 @@ author: "Steve (@groks)"
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Since column is a special character in YAML, if your string contains a column, it's better to use quotes around the string
- name: Set the options explicitly a device which must already exist - name: Set the options explicitly a device which must already exist
crypttab: name=luks-home state=present opts=discard,cipher=aes-cbc-essiv:sha256 crypttab:
name: luks-home
state: present
opts: 'discard,cipher=aes-cbc-essiv:sha256'
- name: Add the 'discard' option to any existing options for all devices - name: Add the 'discard' option to any existing options for all devices
crypttab: name={{ item.device }} state=opts_present opts=discard crypttab:
with_items: "{{ ansible_mounts }}" name: '{{ item.device }}'
state: opts_present
opts: discard
with_items: '{{ ansible_mounts }}'
when: '/dev/mapper/luks-' in {{ item.device }} when: '/dev/mapper/luks-' in {{ item.device }}
''' '''