Fix Ansible documentation in part of example formatting (#334)

This commit is contained in:
Andrew Klychkov 2020-05-15 13:12:41 +03:00 committed by GitHub
commit 983d937b7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
58 changed files with 376 additions and 353 deletions

View file

@ -27,27 +27,32 @@ options:
'''
EXAMPLES = '''
# Return information about all installed images.
- smartos_image_info:
- name: Return information about all installed images
smartos_image_info:
register: result
# Return all private active Linux images.
- smartos_image_info: filters="os=linux state=active public=false"
- name: Return all private active Linux images
smartos_image_info:
filters: "os=linux state=active public=false"
register: result
# Show, how many clones does every image have.
- smartos_image_info:
- name: Show, how many clones does every image have
smartos_image_info:
register: result
- debug: msg="{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }}
has {{ result.smartos_images[item]['clones'] }} VM(s)"
- name: Print information
debug:
msg: "{{ result.smartos_images[item]['name'] }}-{{ result.smartos_images[item]['version'] }}
has {{ result.smartos_images[item]['clones'] }} VM(s)"
with_items: "{{ result.smartos_images.keys() | list }}"
# When the module is called as smartos_image_facts, return values are published
# in ansible_facts['smartos_images'] and can be used as follows.
# Note that this is deprecated and will stop working in Ansible 2.13.
- debug: msg="{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }}
has {{ smartos_images[item]['clones'] }} VM(s)"
- name: Print information
debug:
msg: "{{ smartos_images[item]['name'] }}-{{ smartos_images[item]['version'] }}
has {{ smartos_images[item]['clones'] }} VM(s)"
with_items: "{{ smartos_images.keys() | list }}"
'''