Merge pull request #400 from vladislav-sharapov/fix-doc-boolean-values

Fix boolean values in docs

SUMMARY
Fixes #397
ISSUE TYPE

Docs Pull Request

COMPONENT NAME
Docs of several modules
ADDITIONAL INFORMATION
Notes about testing. I'm not sure how to test collections properly. I have ran ansible-test sanity --python 3.10 and ansible-test units --python 3.10 in venv with ansible-core 2.14 (with 0 return code in both cases). To run units test successfully I had to install pytest-forked pip package in addition to this one pytest-xdist from test-requirements.txt.
Note about issue #397. I haven't changed yes here because in this case it is value from /etc/vfstab. Also I've changed yes for parameters masquerade and icmp_block_inversion because they both are converted to bool by boolean function and will be changed to boolean in a future release (1, 2), for required too.

Reviewed-by: Felix Fontein <felix@fontein.de>
Reviewed-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
softwarefactory-project-zuul[bot] 2022-12-22 08:00:13 +00:00 committed by GitHub
commit a2ab6881db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 98 additions and 95 deletions

View file

@ -0,0 +1,3 @@
---
trivial:
- Change boolean values in documentation to ``true/false`` (https://github.com/ansible-collections/ansible.posix/pull/400).

View file

@ -20,7 +20,7 @@ options:
description: description:
- The full path of the file or object. - The full path of the file or object.
type: path type: path
required: yes required: true
aliases: [ name ] aliases: [ name ]
state: state:
description: description:
@ -33,13 +33,13 @@ options:
description: description:
- Whether to follow symlinks on the path if a symlink is encountered. - Whether to follow symlinks on the path if a symlink is encountered.
type: bool type: bool
default: yes default: true
default: default:
description: description:
- If the target is a directory, setting this to C(yes) will make it the default ACL for entities created inside the directory. - If the target is a directory, setting this to C(true) will make it the default ACL for entities created inside the directory.
- Setting C(default) to C(yes) causes an error if the path is a file. - Setting C(default) to C(true) causes an error if the path is a file.
type: bool type: bool
default: no default: false
entity: entity:
description: description:
- The actual user or group that the ACL applies to when matching entity types user or group are selected. - The actual user or group that the ACL applies to when matching entity types user or group are selected.
@ -70,13 +70,13 @@ options:
- Incompatible with C(state=query). - Incompatible with C(state=query).
- Alias C(recurse) added in version 1.3.0. - Alias C(recurse) added in version 1.3.0.
type: bool type: bool
default: no default: false
aliases: [ recurse ] aliases: [ recurse ]
use_nfsv4_acls: use_nfsv4_acls:
description: description:
- Use NFSv4 ACLs instead of POSIX ACLs. - Use NFSv4 ACLs instead of POSIX ACLs.
type: bool type: bool
default: no default: false
recalculate_mask: recalculate_mask:
description: description:
- Select if and when to recalculate the effective right masks of the files. - Select if and when to recalculate the effective right masks of the files.
@ -116,7 +116,7 @@ EXAMPLES = r'''
entity: joe entity: joe
etype: user etype: user
permissions: rw permissions: rw
default: yes default: true
state: present state: present
- name: Same as previous but using entry shorthand - name: Same as previous but using entry shorthand

View file

@ -44,7 +44,7 @@ options:
description: description:
- If a matching job is present a new job will not be added. - If a matching job is present a new job will not be added.
type: bool type: bool
default: no default: false
requirements: requirements:
- at - at
author: author:
@ -68,7 +68,7 @@ EXAMPLES = r'''
command: ls -d / >/dev/null command: ls -d / >/dev/null
count: 20 count: 20
units: minutes units: minutes
unique: yes unique: true
''' '''
import os import os

View file

@ -34,13 +34,13 @@ options:
manage_dir: manage_dir:
description: description:
- Whether this module should manage the directory of the authorized key file. - Whether this module should manage the directory of the authorized key file.
- If set to C(yes), the module will create the directory, as well as set the owner and permissions - If set to C(true), the module will create the directory, as well as set the owner and permissions
of an existing directory. of an existing directory.
- Be sure to set C(manage_dir=no) if you are using an alternate directory for authorized_keys, - Be sure to set C(manage_dir=false) if you are using an alternate directory for authorized_keys,
as set with C(path), since you could lock yourself out of SSH access. as set with C(path), since you could lock yourself out of SSH access.
- See the example below. - See the example below.
type: bool type: bool
default: yes default: true
state: state:
description: description:
- Whether the given key (with the given key_options) should or should not be in the file. - Whether the given key (with the given key_options) should or should not be in the file.
@ -58,15 +58,15 @@ options:
- This option is not loop aware, so if you use C(with_) , it will be exclusive per iteration of the loop. - This option is not loop aware, so if you use C(with_) , it will be exclusive per iteration of the loop.
- If you want multiple keys in the file you need to pass them all to C(key) in a single batch as mentioned above. - If you want multiple keys in the file you need to pass them all to C(key) in a single batch as mentioned above.
type: bool type: bool
default: no default: false
validate_certs: validate_certs:
description: description:
- This only applies if using a https url as the source of the keys. - This only applies if using a https url as the source of the keys.
- If set to C(no), the SSL certificates will not be validated. - If set to C(false), the SSL certificates will not be validated.
- This should only set to C(no) used on personally controlled sites using self-signed certificates as it avoids verifying the source site. - This should only set to C(false) used on personally controlled sites using self-signed certificates as it avoids verifying the source site.
- Prior to 2.1 the code worked as if this was set to C(yes). - Prior to 2.1 the code worked as if this was set to C(true).
type: bool type: bool
default: yes default: true
comment: comment:
description: description:
- Change the comment on the public key. - Change the comment on the public key.
@ -77,7 +77,7 @@ options:
description: description:
- Follow path symlink instead of replacing it. - Follow path symlink instead of replacing it.
type: bool type: bool
default: no default: false
author: Ansible Core Team author: Ansible Core Team
''' '''
@ -106,7 +106,7 @@ EXAMPLES = r'''
state: present state: present
key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}" key: "{{ lookup('file', '/home/charlie/.ssh/id_rsa.pub') }}"
path: /etc/ssh/authorized_keys/charlie path: /etc/ssh/authorized_keys/charlie
manage_dir: False manage_dir: false
- name: Set up multiple authorized keys - name: Set up multiple authorized keys
ansible.posix.authorized_key: ansible.posix.authorized_key:
@ -129,14 +129,14 @@ EXAMPLES = r'''
user: charlie user: charlie
state: present state: present
key: https://github.com/user.keys key: https://github.com/user.keys
validate_certs: False validate_certs: false
- name: Set authorized key, removing all the authorized keys already set - name: Set authorized key, removing all the authorized keys already set
ansible.posix.authorized_key: ansible.posix.authorized_key:
user: root user: root
key: "{{ lookup('file', 'public_keys/doe-jane') }}" key: "{{ lookup('file', 'public_keys/doe-jane') }}"
state: present state: present
exclusive: True exclusive: true
- name: Set authorized key for user ubuntu copying it from current user - name: Set authorized key for user ubuntu copying it from current user
ansible.posix.authorized_key: ansible.posix.authorized_key:
@ -150,7 +150,7 @@ exclusive:
description: If the key has been forced to be exclusive or not. description: If the key has been forced to be exclusive or not.
returned: success returned: success
type: bool type: bool
sample: False sample: false
key: key:
description: The key that the module was running against. description: The key that the module was running against.
returned: success returned: success
@ -170,7 +170,7 @@ manage_dir:
description: Whether this module managed the directory of the authorized key file. description: Whether this module managed the directory of the authorized key file.
returned: success returned: success
type: bool type: bool
sample: True sample: true
path: path:
description: Alternate path to the authorized_keys file description: Alternate path to the authorized_keys file
returned: success returned: success
@ -192,7 +192,7 @@ user:
type: str type: str
sample: user sample: user
validate_certs: validate_certs:
description: This only applies if using a https url as the source of the keys. If set to C(no), the SSL certificates will not be validated. description: This only applies if using a https url as the source of the keys. If set to C(false), the SSL certificates will not be validated.
returned: success returned: success
type: bool type: bool
sample: true sample: true

View file

@ -82,13 +82,13 @@ options:
description: description:
- Should this configuration be in the running firewalld configuration or persist across reboots. - Should this configuration be in the running firewalld configuration or persist across reboots.
- As of Ansible 2.3, permanent operations can operate on firewalld configs when it is not running (requires firewalld >= 0.3.9). - As of Ansible 2.3, permanent operations can operate on firewalld configs when it is not running (requires firewalld >= 0.3.9).
- Note that if this is C(no), immediate is assumed C(yes). - Note that if this is C(false), immediate is assumed C(true).
type: bool type: bool
immediate: immediate:
description: description:
- Should this configuration be applied immediately, if set as permanent. - Should this configuration be applied immediately, if set as permanent.
type: bool type: bool
default: no default: false
state: state:
description: description:
- Enable or disable a setting. - Enable or disable a setting.
@ -141,29 +141,29 @@ EXAMPLES = r'''
- name: permit traffic in default zone for https service - name: permit traffic in default zone for https service
ansible.posix.firewalld: ansible.posix.firewalld:
service: https service: https
permanent: yes permanent: true
state: enabled state: enabled
- name: do not permit traffic in default zone on port 8081/tcp - name: do not permit traffic in default zone on port 8081/tcp
ansible.posix.firewalld: ansible.posix.firewalld:
port: 8081/tcp port: 8081/tcp
permanent: yes permanent: true
state: disabled state: disabled
- ansible.posix.firewalld: - ansible.posix.firewalld:
port: 161-162/udp port: 161-162/udp
permanent: yes permanent: true
state: enabled state: enabled
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: dmz zone: dmz
service: http service: http
permanent: yes permanent: true
state: enabled state: enabled
- ansible.posix.firewalld: - ansible.posix.firewalld:
rich_rule: rule service name="ftp" audit limit value="1/m" accept rich_rule: rule service name="ftp" audit limit value="1/m" accept
permanent: yes permanent: true
state: enabled state: enabled
- ansible.posix.firewalld: - ansible.posix.firewalld:
@ -174,44 +174,44 @@ EXAMPLES = r'''
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: trusted zone: trusted
interface: eth2 interface: eth2
permanent: yes permanent: true
state: enabled state: enabled
- ansible.posix.firewalld: - ansible.posix.firewalld:
masquerade: yes masquerade: true
state: enabled state: enabled
permanent: yes permanent: true
zone: dmz zone: dmz
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: custom zone: custom
state: present state: present
permanent: yes permanent: true
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: drop zone: drop
state: enabled state: enabled
permanent: yes permanent: true
icmp_block_inversion: yes icmp_block_inversion: true
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: drop zone: drop
state: enabled state: enabled
permanent: yes permanent: true
icmp_block: echo-request icmp_block: echo-request
- ansible.posix.firewalld: - ansible.posix.firewalld:
zone: internal zone: internal
state: present state: present
permanent: yes permanent: true
target: ACCEPT target: ACCEPT
- name: Redirect port 443 to 8443 with Rich Rule - name: Redirect port 443 to 8443 with Rich Rule
ansible.posix.firewalld: ansible.posix.firewalld:
rich_rule: rule family=ipv4 forward-port port=443 protocol=tcp to-port=8443 rich_rule: rule family=ipv4 forward-port port=443 protocol=tcp to-port=8443
zone: public zone: public
permanent: yes permanent: true
immediate: yes immediate: true
state: enabled state: enabled
''' '''

View file

@ -17,7 +17,7 @@ options:
active_zones: active_zones:
description: Gather information about active zones. description: Gather information about active zones.
type: bool type: bool
default: no default: false
zones: zones:
description: description:
- Gather information about specific zones. - Gather information about specific zones.
@ -36,7 +36,7 @@ author:
EXAMPLES = r''' EXAMPLES = r'''
- name: Gather information about active zones - name: Gather information about active zones
ansible.posix.firewalld_info: ansible.posix.firewalld_info:
active_zones: yes active_zones: true
- name: Gather information about specific zones - name: Gather information about specific zones
ansible.posix.firewalld_info: ansible.posix.firewalld_info:

View file

@ -115,13 +115,13 @@ options:
mount module will ignore C(boot). mount module will ignore C(boot).
- This parameter is ignored when I(state) is set to C(ephemeral). - This parameter is ignored when I(state) is set to C(ephemeral).
type: bool type: bool
default: yes default: true
backup: backup:
description: description:
- Create a backup file including the timestamp information so you can get - Create a backup file including the timestamp information so you can get
the original file back if you somehow clobbered it incorrectly. the original file back if you somehow clobbered it incorrectly.
type: bool type: bool
default: no default: false
notes: notes:
- As of Ansible 2.3, the I(name) option has been changed to I(path) as - As of Ansible 2.3, the I(name) option has been changed to I(path) as
default, but I(name) still works as well. default, but I(name) still works as well.
@ -195,7 +195,7 @@ EXAMPLES = r'''
src: 192.168.1.100:/nfs/ssd/shared_data src: 192.168.1.100:/nfs/ssd/shared_data
path: /mnt/shared_data path: /mnt/shared_data
opts: rw,sync,hard opts: rw,sync,hard
boot: no boot: false
state: mounted state: mounted
fstype: nfs fstype: nfs

View file

@ -50,10 +50,10 @@ options:
default: present default: present
remote_src: remote_src:
description: description:
- If C(no), it will search for src at originating/controller machine, if C(yes) it will - If C(false), it will search for src at originating/controller machine, if C(true) it will
go to the remote/target machine for the C(src). go to the remote/target machine for the C(src).
type: bool type: bool
default: no default: false
strip: strip:
description: description:
- Number that indicates the smallest prefix containing leading slashes - Number that indicates the smallest prefix containing leading slashes
@ -65,20 +65,20 @@ options:
description: description:
- Passes C(--backup --version-control=numbered) to patch, producing numbered backup copies. - Passes C(--backup --version-control=numbered) to patch, producing numbered backup copies.
type: bool type: bool
default: no default: false
binary: binary:
description: description:
- Setting to C(yes) will disable patch's heuristic for transforming CRLF - Setting to C(true) will disable patch's heuristic for transforming CRLF
line endings into LF. line endings into LF.
- Line endings of src and dest must match. - Line endings of src and dest must match.
- If set to C(no), C(patch) will replace CRLF in C(src) files on POSIX. - If set to C(false), C(patch) will replace CRLF in C(src) files on POSIX.
type: bool type: bool
default: no default: false
ignore_whitespace: ignore_whitespace:
description: description:
- Setting to C(yes) will ignore white space changes between patch and input.. - Setting to C(true) will ignore white space changes between patch and input.
type: bool type: bool
default: no default: false
notes: notes:
- This module requires GNU I(patch) utility to be installed on the remote host. - This module requires GNU I(patch) utility to be installed on the remote host.
''' '''

View file

@ -22,9 +22,9 @@ options:
type: str type: str
persistent: persistent:
description: description:
- Set to C(yes) if the boolean setting should survive a reboot. - Set to C(true) if the boolean setting should survive a reboot.
type: bool type: bool
default: 'no' default: false
state: state:
description: description:
- Desired boolean value - Desired boolean value
@ -49,8 +49,8 @@ EXAMPLES = r'''
- name: Set httpd_can_network_connect flag on and keep it persistent across reboots - name: Set httpd_can_network_connect flag on and keep it persistent across reboots
ansible.posix.seboolean: ansible.posix.seboolean:
name: httpd_can_network_connect name: httpd_can_network_connect
state: yes state: true
persistent: yes persistent: true
''' '''
import os import os

View file

@ -32,7 +32,7 @@ options:
description: description:
- If set to I(true), will update also the kernel boot parameters when disabling/enabling SELinux. - If set to I(true), will update also the kernel boot parameters when disabling/enabling SELinux.
- The C(grubby) tool must be present on the target system for this to work. - The C(grubby) tool must be present on the target system for this to work.
default: no default: false
type: bool type: bool
version_added: '1.4.0' version_added: '1.4.0'
configfile: configfile:

View file

@ -53,36 +53,36 @@ options:
description: description:
- Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D. - Mirrors the rsync archive flag, enables recursive, links, perms, times, owner, group flags and -D.
type: bool type: bool
default: yes default: true
checksum: checksum:
description: description:
- Skip based on checksum, rather than mod-time & size; Note that that "archive" option is still enabled by default - the "checksum" option will - Skip based on checksum, rather than mod-time & size; Note that that "archive" option is still enabled by default - the "checksum" option will
not disable it. not disable it.
type: bool type: bool
default: no default: false
compress: compress:
description: description:
- Compress file data during the transfer. - Compress file data during the transfer.
- In most cases, leave this enabled unless it causes problems. - In most cases, leave this enabled unless it causes problems.
type: bool type: bool
default: yes default: true
existing_only: existing_only:
description: description:
- Skip creating new files on receiver. - Skip creating new files on receiver.
type: bool type: bool
default: no default: false
delete: delete:
description: description:
- Delete files in I(dest) that do not exist (after transfer, not before) in the I(src) path. - Delete files in I(dest) that do not exist (after transfer, not before) in the I(src) path.
- This option requires I(recursive=yes). - This option requires I(recursive=true).
- This option ignores excluded files and behaves like the rsync opt C(--delete-after). - This option ignores excluded files and behaves like the rsync opt C(--delete-after).
type: bool type: bool
default: no default: false
dirs: dirs:
description: description:
- Transfer directories without recursing. - Transfer directories without recursing.
type: bool type: bool
default: no default: false
recursive: recursive:
description: description:
- Recurse into directories. - Recurse into directories.
@ -97,7 +97,7 @@ options:
description: description:
- Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink. - Copy symlinks as the item that they point to (the referent) is copied, rather than the symlink.
type: bool type: bool
default: no default: false
perms: perms:
description: description:
- Preserve permissions. - Preserve permissions.
@ -132,26 +132,26 @@ options:
description: description:
- Put user@ for the remote paths. - Put user@ for the remote paths.
- If you have a custom ssh config to define the remote user for a host - If you have a custom ssh config to define the remote user for a host
that does not match the inventory user, you should set this parameter to C(no). that does not match the inventory user, you should set this parameter to C(false).
type: bool type: bool
default: yes default: true
use_ssh_args: use_ssh_args:
description: description:
- In Ansible 2.10 and lower, it uses the ssh_args specified in C(ansible.cfg). - In Ansible 2.10 and lower, it uses the ssh_args specified in C(ansible.cfg).
- In Ansible 2.11 and onwards, when set to C(true), it uses all SSH connection configurations like - In Ansible 2.11 and onwards, when set to C(true), it uses all SSH connection configurations like
C(ansible_ssh_args), C(ansible_ssh_common_args), and C(ansible_ssh_extra_args). C(ansible_ssh_args), C(ansible_ssh_common_args), and C(ansible_ssh_extra_args).
type: bool type: bool
default: no default: false
ssh_connection_multiplexing: ssh_connection_multiplexing:
description: description:
- SSH connection multiplexing for rsync is disabled by default to prevent misconfigured ControlSockets from resulting in failed SSH connections. - SSH connection multiplexing for rsync is disabled by default to prevent misconfigured ControlSockets from resulting in failed SSH connections.
This is accomplished by setting the SSH C(ControlSocket) to C(none). This is accomplished by setting the SSH C(ControlSocket) to C(none).
- Set this option to C(yes) to allow multiplexing and reduce SSH connection overhead. - Set this option to C(true) to allow multiplexing and reduce SSH connection overhead.
- Note that simply setting this option to C(yes) is not enough; - Note that simply setting this option to C(true) is not enough;
You must also configure SSH connection multiplexing in your SSH client config by setting values for You must also configure SSH connection multiplexing in your SSH client config by setting values for
C(ControlMaster), C(ControlPersist) and C(ControlPath). C(ControlMaster), C(ControlPersist) and C(ControlPath).
type: bool type: bool
default: no default: false
rsync_opts: rsync_opts:
description: description:
- Specify additional rsync options by passing in an array. - Specify additional rsync options by passing in an array.
@ -163,12 +163,12 @@ options:
description: description:
- Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster. - Tells rsync to keep the partial file which should make a subsequent transfer of the rest of the file much faster.
type: bool type: bool
default: no default: false
verify_host: verify_host:
description: description:
- Verify destination host key. - Verify destination host key.
type: bool type: bool
default: no default: false
private_key: private_key:
description: description:
- Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa)). - Specify the private key to use for SSH-based rsync connections (e.g. C(~/.ssh/id_rsa)).
@ -184,7 +184,7 @@ options:
- This option puts the temporary file from each updated file into a holding directory until the end of the transfer, - This option puts the temporary file from each updated file into a holding directory until the end of the transfer,
at which time all the files are renamed into place in rapid succession. at which time all the files are renamed into place in rapid succession.
type: bool type: bool
default: yes default: true
version_added: '1.3.0' version_added: '1.3.0'
notes: notes:
@ -252,27 +252,27 @@ EXAMPLES = r'''
ansible.posix.synchronize: ansible.posix.synchronize:
src: some/relative/path src: some/relative/path
dest: /some/absolute/path dest: /some/absolute/path
archive: no archive: false
- name: Synchronization with --archive options enabled except for --recursive - name: Synchronization with --archive options enabled except for --recursive
ansible.posix.synchronize: ansible.posix.synchronize:
src: some/relative/path src: some/relative/path
dest: /some/absolute/path dest: /some/absolute/path
recursive: no recursive: false
- name: Synchronization with --archive options enabled except for --times, with --checksum option enabled - name: Synchronization with --archive options enabled except for --times, with --checksum option enabled
ansible.posix.synchronize: ansible.posix.synchronize:
src: some/relative/path src: some/relative/path
dest: /some/absolute/path dest: /some/absolute/path
checksum: yes checksum: true
times: no times: false
- name: Synchronization without --archive options enabled except use --links - name: Synchronization without --archive options enabled except use --links
ansible.posix.synchronize: ansible.posix.synchronize:
src: some/relative/path src: some/relative/path
dest: /some/absolute/path dest: /some/absolute/path
archive: no archive: false
links: yes links: true
- name: Synchronization of two paths both on the control machine - name: Synchronization of two paths both on the control machine
ansible.posix.synchronize: ansible.posix.synchronize:
@ -302,8 +302,8 @@ EXAMPLES = r'''
ansible.posix.synchronize: ansible.posix.synchronize:
src: some/relative/path src: some/relative/path
dest: /some/absolute/path dest: /some/absolute/path
delete: yes delete: true
recursive: yes recursive: true
# This specific command is granted su privileges on the destination # This specific command is granted su privileges on the destination
- name: Synchronize using an alternate rsync command - name: Synchronize using an alternate rsync command

View file

@ -38,14 +38,14 @@ options:
description: description:
- Use this option to ignore errors about unknown keys. - Use this option to ignore errors about unknown keys.
type: bool type: bool
default: 'no' default: false
reload: reload:
description: description:
- If C(yes), performs a I(/sbin/sysctl -p) if the C(sysctl_file) is - If C(true), performs a I(/sbin/sysctl -p) if the C(sysctl_file) is
updated. If C(no), does not reload I(sysctl) even if the updated. If C(false), does not reload I(sysctl) even if the
C(sysctl_file) is updated. C(sysctl_file) is updated.
type: bool type: bool
default: 'yes' default: true
sysctl_file: sysctl_file:
description: description:
- Specifies the absolute path to C(sysctl.conf), if not C(/etc/sysctl.conf). - Specifies the absolute path to C(sysctl.conf), if not C(/etc/sysctl.conf).
@ -53,9 +53,9 @@ options:
type: path type: path
sysctl_set: sysctl_set:
description: description:
- Verify token value with the sysctl command and set with -w if necessary - Verify token value with the sysctl command and set with -w if necessary.
type: bool type: bool
default: 'no' default: false
author: author:
- David CHANIAL (@davixx) - David CHANIAL (@davixx)
''' '''
@ -78,21 +78,21 @@ EXAMPLES = r'''
name: kernel.panic name: kernel.panic
value: '3' value: '3'
sysctl_file: /tmp/test_sysctl.conf sysctl_file: /tmp/test_sysctl.conf
reload: no reload: false
# Set ip forwarding on in /proc and verify token value with the sysctl command # Set ip forwarding on in /proc and verify token value with the sysctl command
- ansible.posix.sysctl: - ansible.posix.sysctl:
name: net.ipv4.ip_forward name: net.ipv4.ip_forward
value: '1' value: '1'
sysctl_set: yes sysctl_set: true
# Set ip forwarding on in /proc and in the sysctl file and reload if necessary # Set ip forwarding on in /proc and in the sysctl file and reload if necessary
- ansible.posix.sysctl: - ansible.posix.sysctl:
name: net.ipv4.ip_forward name: net.ipv4.ip_forward
value: '1' value: '1'
sysctl_set: yes sysctl_set: true
state: present state: present
reload: yes reload: true
''' '''
# ============================================================== # ==============================================================