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 <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Alexei Znamensky 2025-04-22 01:31:54 +12:00 committed by GitHub
parent 3ee55c6828
commit 73178e3d33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 7 additions and 8 deletions

View file

@ -120,7 +120,7 @@ EXAMPLES = r"""
community.general.btrfs_subvolume: community.general.btrfs_subvolume:
name: /@ name: /@
snapshot_source: / snapshot_source: /
default: Yes default: true
filesystem_device: /dev/vda2 filesystem_device: /dev/vda2
- name: Create a snapshot of the /@ subvolume and recursively creating intermediate subvolumes as required - name: Create a snapshot of the /@ subvolume and recursively creating intermediate subvolumes as required

View file

@ -85,7 +85,7 @@ EXAMPLES = r"""
password: '9s36?;fyNp' password: '9s36?;fyNp'
owner: root owner: root
group: www-data group: www-data
mode: 0640 mode: '0640'
- name: Remove a user from a password file - name: Remove a user from a password file
community.general.htpasswd: community.general.htpasswd:

View file

@ -124,7 +124,7 @@ EXAMPLES = r"""
server: irc.example.net server: irc.example.net
use_tls: true use_tls: true
validate_certs: true validate_certs: true
channel: #t1 channel: '#t1'
msg: Hello world msg: Hello world
- name: Send a message to an IRC channel - name: Send a message to an IRC channel
@ -134,7 +134,7 @@ EXAMPLES = r"""
server: irc.example.net server: irc.example.net
use_tls: true use_tls: true
validate_certs: true validate_certs: true
channel: #t1 channel: '#t1'
msg: 'All finished at {{ ansible_date_time.iso8601 }}' msg: 'All finished at {{ ansible_date_time.iso8601 }}'
color: red color: red
nick: ansibleIRC nick: ansibleIRC
@ -146,7 +146,7 @@ EXAMPLES = r"""
server: irc.example.net server: irc.example.net
use_tls: true use_tls: true
validate_certs: true validate_certs: true
channel: #t1 channel: '#t1'
nick_to: nick_to:
- nick1 - nick1
- nick2 - nick2

View file

@ -342,7 +342,7 @@ EXAMPLES = r"""
# nodes - 'node01' and 'node02'. In 'target:', 'node01' and 'node02' are names of LXD cluster # 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'. # 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 # 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 - hosts: node01.example.com
tasks: tasks:
- name: Create LXD container - name: Create LXD container

View file

@ -1227,7 +1227,6 @@ EXAMPLES = r"""
# ``` # ```
## playbook-add.yml example ## playbook-add.yml example
- hosts: openstack-stage - hosts: openstack-stage
@ -1264,7 +1263,7 @@ EXAMPLES = r"""
with_items: with_items:
- '{{ nmcli_team_slave }}' - '{{ 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 - name: Try nmcli add bond - conn_name only & ip4 gw4 mode
community.general.nmcli: community.general.nmcli:
type: bond type: bond