From ea9db2b4410ee71d4616ea8ad309114308b10988 Mon Sep 17 00:00:00 2001 From: Sandra McCann Date: Fri, 10 Feb 2023 20:18:02 -0500 Subject: Backportapalooza 02 09 (#79962) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make this a warning, not a comment (#79928) Co-authored-by: Alicia Cozine (cherry picked from commit 5f947f867cc526a43c3070a4a9ae380c385edb1d) * Update example to always init ANOTHER_LIBRARY_IMPORT_ERROR (#79927) (cherry picked from commit 24519f3bd1b23bc89a968383f54a8b1fe708e3af) * Rst fixes (#79939) * fix rstcheck errors for 6.1.1 * spell shell correctly (cherry picked from commit dc990058201d63df685e83a316cf3402242ff1b4) * Update dnf.py (#79679) (cherry picked from commit 0ab53aefc94afa3829676d25f732526773d31d0a) * Change `yes` to `true` in uri-module (#79934) (cherry picked from commit b5ff981369dd926f6ecf135a90f9b4f8375fb6c4) --------- Co-authored-by: Alicia Cozine <879121+acozine@users.noreply.github.com> Co-authored-by: Matt Martz Co-authored-by: Bartłomiej Kida Co-authored-by: Sebastian Gumprich --- lib/ansible/modules/dnf.py | 8 ++++++++ lib/ansible/modules/uri.py | 14 +++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'lib/ansible/modules') diff --git a/lib/ansible/modules/dnf.py b/lib/ansible/modules/dnf.py index a3b09908a4..8131833e31 100644 --- a/lib/ansible/modules/dnf.py +++ b/lib/ansible/modules/dnf.py @@ -313,6 +313,14 @@ EXAMPLES = ''' name: "*" 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 ansible.builtin.dnf: name: 'http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm' diff --git a/lib/ansible/modules/uri.py b/lib/ansible/modules/uri.py index c00213644d..f68b86a530 100644 --- a/lib/ansible/modules/uri.py +++ b/lib/ansible/modules/uri.py @@ -142,7 +142,7 @@ options: - 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). type: bool - default: yes + default: true version_added: '1.9.2' client_cert: description: @@ -184,7 +184,7 @@ options: description: - If C(false), it will not use a proxy, even if one is defined in an environment variable on the target hosts. type: bool - default: yes + default: true unix_socket: description: - 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 ansible.builtin.uri: url: http://www.example.com - return_content: yes + return_content: true register: this failed_when: "'AWESOME' not in this.content" @@ -263,7 +263,7 @@ EXAMPLES = r''' password: your_pass method: POST body: "{{ lookup('ansible.builtin.file','issue.json') }}" - force_basic_auth: yes + force_basic_auth: true status_code: 201 body_format: json @@ -310,7 +310,7 @@ EXAMPLES = r''' ansible.builtin.uri: url: https://your.form.based.auth.example.com/dashboard.php method: GET - return_content: yes + return_content: true headers: Cookie: "{{ login.cookies_string }}" @@ -320,7 +320,7 @@ EXAMPLES = r''' user: "{{ jenkins.user }}" password: "{{ jenkins.password }}" method: GET - force_basic_auth: yes + force_basic_auth: true status_code: 201 - name: POST from contents of local file @@ -334,7 +334,7 @@ EXAMPLES = r''' url: https://httpbin.org/post method: POST src: /path/to/my/file.json - remote_src: yes + remote_src: true - name: Create workspaces in Log analytics Azure ansible.builtin.uri: -- cgit v1.2.1