Fix examples formatting (#345)

This commit is contained in:
Andrew Klychkov 2020-05-16 16:07:51 +03:00 committed by GitHub
commit a7c830f49d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
148 changed files with 330 additions and 334 deletions

View file

@ -60,42 +60,42 @@ notes:
'''
EXAMPLES = '''
- name: start dnscache if not running
- name: Start dnscache if not running
nosh: name=dnscache state=started
- name: stop mpd, if running
- name: Stop mpd, if running
nosh: name=mpd state=stopped
- name: restart unbound or start it if not already running
- name: Restart unbound or start it if not already running
nosh:
name: unbound
state: restarted
- name: reload fail2ban or start it if not already running
- name: Reload fail2ban or start it if not already running
nosh:
name: fail2ban
state: reloaded
- name: disable nsd
- name: Disable nsd
nosh: name=nsd enabled=no
- name: for package installers, set nginx running state according to local enable settings, preset and reset
- name: For package installers, set nginx running state according to local enable settings, preset and reset
nosh: name=nginx preset=True state=reset
- name: reboot the host if nosh is the system manager, would need a "wait_for*" task at least, not recommended as-is
- name: Reboot the host if nosh is the system manager, would need a "wait_for*" task at least, not recommended as-is
nosh: name=reboot state=started
- name: using conditionals with the module facts
- name: Using conditionals with the module facts
tasks:
- name: obtain information on tinydns service
- name: Obtain information on tinydns service
nosh: name=tinydns
register: result
- name: fail if service not loaded
- name: Fail if service not loaded
fail: msg="The {{ result.name }} service is not loaded"
when: not result.status
- name: fail if service is running
- name: Fail if service is running
fail: msg="The {{ result.name }} service is running"
when: result.status and result.status['DaemontoolsEncoreState'] == "running"
'''