summaryrefslogtreecommitdiff
path: root/system/sysctl.py
diff options
context:
space:
mode:
Diffstat (limited to 'system/sysctl.py')
-rw-r--r--system/sysctl.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/system/sysctl.py b/system/sysctl.py
index 3df8e1fe..9a6787e2 100644
--- a/system/sysctl.py
+++ b/system/sysctl.py
@@ -76,25 +76,37 @@ author: "David CHANIAL (@davixx) <david.chanial@gmail.com>"
EXAMPLES = '''
# Set vm.swappiness to 5 in /etc/sysctl.conf
-- sysctl:
- name: vm.swappiness
+- sysctl:
+ name: vm.swappiness
value: 5
state: present
# Remove kernel.panic entry from /etc/sysctl.conf
- sysctl:
name: kernel.panic
- state: absent
+ state: absent
sysctl_file: /etc/sysctl.conf
# Set kernel.panic to 3 in /tmp/test_sysctl.conf
-- sysctl: name=kernel.panic value=3 sysctl_file=/tmp/test_sysctl.conf reload=no
+- sysctl:
+ name: kernel.panic
+ value: 3
+ sysctl_file: /tmp/test_sysctl.conf
+ reload: no
# Set ip forwarding on in /proc and do not reload the sysctl file
-- sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes
+- sysctl:
+ name: net.ipv4.ip_forward
+ value: 1
+ sysctl_set: yes
# Set ip forwarding on in /proc and in the sysctl file and reload if necessary
-- sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes state=present reload=yes
+- sysctl:
+ name: net.ipv4.ip_forward
+ value: 1
+ sysctl_set: yes
+ state: present
+ reload: yes
'''
# ==============================================================