modules: fix examples to use FQCN for builtin modules (#648)

* modules: fix examples to use FQCN for builtin modules

* fix

* fix

* fix

* fix

* fix

* fix

* fix
This commit is contained in:
Andrew Klychkov 2020-07-14 18:28:08 +03:00 committed by GitHub
commit c055340ecb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
126 changed files with 290 additions and 286 deletions

View file

@ -25,7 +25,7 @@ EXAMPLES = r'''
community.general.listen_ports_facts:
- name: TCP whitelist violation
debug:
ansible.builtin.debug:
msg: TCP port {{ item.port }} by pid {{ item.pid }} violates the whitelist
vars:
tcp_listen_violations: "{{ ansible_facts.tcp_listen | selectattr('port', 'in', tcp_whitelist) | list }}"
@ -35,15 +35,15 @@ EXAMPLES = r'''
loop: "{{ tcp_listen_violations }}"
- name: List TCP ports
debug:
ansible.builtin.debug:
msg: "{{ ansible_facts.tcp_listen | map(attribute='port') | sort | list }}"
- name: List UDP ports
debug:
ansible.builtin.debug:
msg: "{{ ansible_facts.udp_listen | map(attribute='port') | sort | list }}"
- name: List all ports
debug:
ansible.builtin.debug:
msg: "{{ (ansible_facts.tcp_listen + ansible_facts.udp_listen) | map(attribute='port') | unique | sort | list }}"
'''

View file

@ -92,11 +92,11 @@ EXAMPLES = '''
register: result
- name: Fail if service not loaded
fail: msg="The {{ result.name }} service is not loaded"
ansible.builtin.fail: msg="The {{ result.name }} service is not loaded"
when: not result.status
- name: Fail if service is running
fail: msg="The {{ result.name }} service is running"
ansible.builtin.fail: msg="The {{ result.name }} service is running"
when: result.status and result.status['DaemontoolsEncoreState'] == "running"
'''

View file

@ -27,7 +27,7 @@ EXAMPLES = '''
register: pids_of_python
- name: Printing the process IDs obtained
debug:
ansible.builtin.debug:
msg: "PIDS of python:{{pids_of_python.pids|join(',')}}"
'''

View file

@ -92,7 +92,7 @@ EXAMPLES = r'''
state: present
- name: Apply new SELinux file context to filesystem
command: restorecon -irv /srv/git_repos
ansible.builtin.command: restorecon -irv /srv/git_repos
'''
RETURN = r'''

View file

@ -53,7 +53,7 @@ EXAMPLES = '''
register: syspatch
- name: Reboot if patch requires it
reboot:
ansible.builtin.reboot:
when: syspatch.reboot_needed
'''