Backportapalooza 08 25 (#78647)

* fix adhoc dev example (#78593)

(cherry picked from commit 5ac40b358d)

* Docs: fix issue-76133-apt-repository (#78586)

(cherry picked from commit 3b9f1871e5)

* Fixes parameter name in expect module examples (#78635)

(cherry picked from commit 81813b7f23)

* doc: Correct mixed up commentary and task name (#78610)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
(cherry picked from commit 87ba1e29d3)

Co-authored-by: Sloane Hertel <19572925+s-hertel@users.noreply.github.com>
Co-authored-by: Arnold Kamanzi <kamstan6@gmail.com>
Co-authored-by: gmdmi <gmdmi@ya.ru>
Co-authored-by: rawtaz <rawtaz@users.noreply.github.com>
pull/78660/head
Sandra McCann 3 years ago committed by GitHub
parent 8071f014f6
commit a55ffb8d17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -80,13 +80,13 @@ The simplest way is to use ``ansible`` adhoc command:
.. code:: shell
ansible -m library/my_test.py -a 'name=hello new=true' remotehost
ANSIBLE_LIBRARY=./library ansible -m my_test -a 'name=hello new=true' remotehost
If your module does not need to target a remote host, you can quickly and easily exercise your code locally like this:
.. code:: shell
ansible -m library/my_test.py -a 'name=hello new=true' localhost
ANSIBLE_LIBRARY=./library ansible -m my_test -a 'name=hello new=true' localhost
- If for any reason (pdb, using print(), faster iteration, etc) you want to avoid going through Ansible,
another way is to create an arguments file, a basic JSON config file that passes parameters to your module so that you can run it.

@ -99,6 +99,7 @@ version_added: "0.7"
requirements:
- python-apt (python 2)
- python3-apt (python 3)
- apt-key or gpg
'''
EXAMPLES = '''

@ -90,7 +90,7 @@ author: "Matt Martz (@sivel)"
EXAMPLES = r'''
- name: Case insensitive password string match
ansible.builtin.expect:
ansible.builtin.command: passwd username
command: passwd username
responses:
(?i)password: "MySekretPa$$word"
# you don't want to show passwords in your logs
@ -98,7 +98,7 @@ EXAMPLES = r'''
- name: Generic question with multiple different responses
ansible.builtin.expect:
ansible.builtin.command: /path/to/custom/command
command: /path/to/custom/command
responses:
Question:
- response1

@ -110,7 +110,7 @@ notes:
'''
EXAMPLES = r'''
- name: Before Ansible 2.3, option 'dest', 'destfile' or 'name' was used instead of 'path'
- name: Replace old hostname with new hostname (requires Ansible >= 2.4)
ansible.builtin.replace:
path: /etc/hosts
regexp: '(\s+)old\.host\.name(\s+.*)?$'

Loading…
Cancel
Save