From 42aeeb975b8a55b495e2b6fddaf618993d771f3a Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 21 Apr 2025 13:53:51 +0000 Subject: [PATCH] [PR #10029/73178e3d backport][stable-10] fixed hidden warnings from extra tests - batch 3 (#10045) fixed hidden warnings from extra tests - batch 3 (#10029) * fixed hidden warnings from extra tests - batch 3 * add empty lines to separate sections of the EXAMPLE block * Apply suggestions from code review * Update plugins/modules/nmcli.py Co-authored-by: Felix Fontein --------- Co-authored-by: Felix Fontein (cherry picked from commit 73178e3d33fcf9dd0bea0166fa9145d02210630b) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/modules/btrfs_subvolume.py | 2 +- plugins/modules/htpasswd.py | 2 +- plugins/modules/irc.py | 6 +++--- plugins/modules/lxd_container.py | 2 +- plugins/modules/nmcli.py | 3 +-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/plugins/modules/btrfs_subvolume.py b/plugins/modules/btrfs_subvolume.py index b1593a8ecd..7e085d6103 100644 --- a/plugins/modules/btrfs_subvolume.py +++ b/plugins/modules/btrfs_subvolume.py @@ -120,7 +120,7 @@ EXAMPLES = r""" community.general.btrfs_subvolume: name: /@ snapshot_source: / - default: Yes + default: true filesystem_device: /dev/vda2 - name: Create a snapshot of the /@ subvolume and recursively creating intermediate subvolumes as required diff --git a/plugins/modules/htpasswd.py b/plugins/modules/htpasswd.py index de94765130..f13cd5a610 100644 --- a/plugins/modules/htpasswd.py +++ b/plugins/modules/htpasswd.py @@ -85,7 +85,7 @@ EXAMPLES = r""" password: '9s36?;fyNp' owner: root group: www-data - mode: 0640 + mode: '0640' - name: Remove a user from a password file community.general.htpasswd: diff --git a/plugins/modules/irc.py b/plugins/modules/irc.py index cbeb3fafa0..36fc31fc37 100644 --- a/plugins/modules/irc.py +++ b/plugins/modules/irc.py @@ -124,7 +124,7 @@ EXAMPLES = r""" server: irc.example.net use_tls: true validate_certs: true - channel: #t1 + channel: '#t1' msg: Hello world - name: Send a message to an IRC channel @@ -134,7 +134,7 @@ EXAMPLES = r""" server: irc.example.net use_tls: true validate_certs: true - channel: #t1 + channel: '#t1' msg: 'All finished at {{ ansible_date_time.iso8601 }}' color: red nick: ansibleIRC @@ -146,7 +146,7 @@ EXAMPLES = r""" server: irc.example.net use_tls: true validate_certs: true - channel: #t1 + channel: '#t1' nick_to: - nick1 - nick2 diff --git a/plugins/modules/lxd_container.py b/plugins/modules/lxd_container.py index 4fc0e4293d..f347df7492 100644 --- a/plugins/modules/lxd_container.py +++ b/plugins/modules/lxd_container.py @@ -342,7 +342,7 @@ EXAMPLES = r""" # nodes - 'node01' and 'node02'. In 'target:', 'node01' and 'node02' are names of LXD cluster # members that LXD cluster recognizes, not ansible inventory names, see: 'lxc cluster list'. # LXD API calls can be made to any LXD member, in this example, we send API requests to -#'node01.example.com', which matches ansible inventory name. +# 'node01.example.com', which matches ansible inventory name. - hosts: node01.example.com tasks: - name: Create LXD container diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 43cf041ddb..751f9dd948 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -1227,7 +1227,6 @@ EXAMPLES = r""" # ``` - ## playbook-add.yml example - hosts: openstack-stage @@ -1264,7 +1263,7 @@ EXAMPLES = r""" with_items: - '{{ nmcli_team_slave }}' -###### Working with all cloud nodes - Bonding +##### Working with all cloud nodes - Bonding - name: Try nmcli add bond - conn_name only & ip4 gw4 mode community.general.nmcli: type: bond