Backportapalooza 02 09 (#79962)

* make this a warning, not a comment (#79928)

Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
(cherry picked from commit 5f947f867c)

* Update example to always init ANOTHER_LIBRARY_IMPORT_ERROR (#79927)

(cherry picked from commit 24519f3bd1)

* Rst fixes (#79939)

* fix rstcheck errors for 6.1.1
* spell shell correctly

(cherry picked from commit dc99005820)

* Update dnf.py (#79679)

(cherry picked from commit 0ab53aefc9)

* Change `yes` to `true` in uri-module (#79934)

(cherry picked from commit b5ff981369)

---------

Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com>
Co-authored-by: Matt Martz <matt@sivel.net>
Co-authored-by: Bartłomiej Kida <wireboot@gmail.com>
Co-authored-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
pull/80001/head
Sandra McCann 2 years ago committed by GitHub
parent 9e507faea5
commit ea9db2b441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,7 +78,7 @@ You can use git repositories for collection dependencies during local developmen
dependencies: {'git@github.com:organization/repo_name.git': 'devel'} dependencies: {'git@github.com:organization/repo_name.git': 'devel'}
.. warning .. warning::
Do not use git repositories as dependencies for published collections. Dependencies for published collections must be other published collections. Do not use git repositories as dependencies for published collections. Dependencies for published collections must be other published collections.

@ -28,6 +28,7 @@ Instead of using ``import another_library``:
ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc() ANOTHER_LIBRARY_IMPORT_ERROR = traceback.format_exc()
else: else:
HAS_ANOTHER_LIBRARY = True HAS_ANOTHER_LIBRARY = True
ANOTHER_LIBRARY_IMPORT_ERROR = None
.. note:: .. note::

@ -388,8 +388,8 @@ Here is a simple mock of :meth:`AnsibleModule.run_command` (taken from :file:`te
with patch.object(basic.AnsibleModule, 'run_command') as run_command: with patch.object(basic.AnsibleModule, 'run_command') as run_command:
run_command.return_value = 0, '', '' # successful execution, no output run_command.return_value = 0, '', '' # successful execution, no output
with self.assertRaises(AnsibleExitJson) as result: with self.assertRaises(AnsibleExitJson) as result:
my_module.main() my_module.main()
self.assertFalse(result.exception.args[0]['changed']) self.assertFalse(result.exception.args[0]['changed'])
# Check that run_command has been called # Check that run_command has been called
run_command.assert_called_once_with('/usr/bin/command args') run_command.assert_called_once_with('/usr/bin/command args')

@ -91,7 +91,7 @@ The playbook sets three of the seven values from the command line above: the gro
The playbook contains one play with two tasks, and should generate output like this: The playbook contains one play with two tasks, and should generate output like this:
.. code-block:: bash .. code-block:: shell
$ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook.yml $ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook.yml
@ -115,7 +115,7 @@ The playbook contains one play with two tasks, and should generate output like t
The extended first playbook has five tasks in a single play. Run it with the same command you used above. The output shows you the change Ansible made to the config: The extended first playbook has five tasks in a single play. Run it with the same command you used above. The output shows you the change Ansible made to the config:
.. code-block:: bash .. code-block:: shell
$ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook_ext.yml $ ansible-playbook -i vyos.example.net, -u ansible -k -e ansible_network_os=vyos.vyos.vyos first_playbook_ext.yml

@ -313,6 +313,14 @@ EXAMPLES = '''
name: "*" name: "*"
state: latest state: latest
- name: Update the webserver, depending on which is installed on the system. Do not install the other one
ansible.builtin.dnf:
name:
- httpd
- nginx
state: latest
update_only: yes
- name: Install the nginx rpm from a remote repo - name: Install the nginx rpm from a remote repo
ansible.builtin.dnf: ansible.builtin.dnf:
name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm' name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm'

@ -142,7 +142,7 @@ options:
- This should only set to C(false) used on personally controlled sites using self-signed certificates. - This should only set to C(false) used on personally controlled sites using self-signed certificates.
- Prior to 1.9.2 the code defaulted to C(false). - Prior to 1.9.2 the code defaulted to C(false).
type: bool type: bool
default: yes default: true
version_added: '1.9.2' version_added: '1.9.2'
client_cert: client_cert:
description: description:
@ -184,7 +184,7 @@ options:
description: description:
- If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. - If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts.
type: bool type: bool
default: yes default: true
unix_socket: unix_socket:
description: description:
- Path to Unix domain socket to use for connection - Path to Unix domain socket to use for connection
@ -252,7 +252,7 @@ EXAMPLES = r'''
- name: Check that a page returns a status 200 and fail if the word AWESOME is not in the page contents - name: Check that a page returns a status 200 and fail if the word AWESOME is not in the page contents
ansible.builtin.uri: ansible.builtin.uri:
url: http://www.example.com url: http://www.example.com
return_content: yes return_content: true
register: this register: this
failed_when: "'AWESOME' not in this.content" failed_when: "'AWESOME' not in this.content"
@ -263,7 +263,7 @@ EXAMPLES = r'''
password: your_pass password: your_pass
method: POST method: POST
body: "{{ lookup('ansible.builtin.file','issue.json') }}" body: "{{ lookup('ansible.builtin.file','issue.json') }}"
force_basic_auth: yes force_basic_auth: true
status_code: 201 status_code: 201
body_format: json body_format: json
@ -310,7 +310,7 @@ EXAMPLES = r'''
ansible.builtin.uri: ansible.builtin.uri:
url: https://your.form.based.auth.example.com/dashboard.php url: https://your.form.based.auth.example.com/dashboard.php
method: GET method: GET
return_content: yes return_content: true
headers: headers:
Cookie: "{{ login.cookies_string }}" Cookie: "{{ login.cookies_string }}"
@ -320,7 +320,7 @@ EXAMPLES = r'''
user: "{{ jenkins.user }}" user: "{{ jenkins.user }}"
password: "{{ jenkins.password }}" password: "{{ jenkins.password }}"
method: GET method: GET
force_basic_auth: yes force_basic_auth: true
status_code: 201 status_code: 201
- name: POST from contents of local file - name: POST from contents of local file
@ -334,7 +334,7 @@ EXAMPLES = r'''
url: https://httpbin.org/post url: https://httpbin.org/post
method: POST method: POST
src: /path/to/my/file.json src: /path/to/my/file.json
remote_src: yes remote_src: true
- name: Create workspaces in Log analytics Azure - name: Create workspaces in Log analytics Azure
ansible.builtin.uri: ansible.builtin.uri:

Loading…
Cancel
Save