Add sysctl customization: swapiness
This commit is contained in:
parent
7ceb1742b3
commit
2c9ff9fe57
|
@ -1,12 +1,13 @@
|
|||
---
|
||||
- hosts: all
|
||||
roles:
|
||||
- auto_reboot
|
||||
- auto_upgrade
|
||||
- client_ntp
|
||||
- client_resolvers
|
||||
- client_tools
|
||||
- users_sudo
|
||||
- client_iptables
|
||||
- munin-node
|
||||
- munin-async
|
||||
# - auto_reboot
|
||||
# - auto_upgrade
|
||||
- sysctl_customizations
|
||||
# - client_ntp
|
||||
# - client_resolvers
|
||||
# - client_tools
|
||||
# - users_sudo
|
||||
# - client_iptables
|
||||
# - munin-node
|
||||
# - munin-async
|
||||
|
|
42
roles/sysctl_customizations/README.md
Normal file
42
roles/sysctl_customizations/README.md
Normal file
|
@ -0,0 +1,42 @@
|
|||
Ansible Role: systctl customization
|
||||
=========
|
||||
|
||||
This role set up sysctl customization for a GNU/Linux server.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
||||
None.
|
||||
|
||||
Role Variables
|
||||
--------------
|
||||
|
||||
All variables and default values are defined in `defaults/main.yml` :
|
||||
|
||||
# Sysctl swapiness value
|
||||
sysctl_vm_swapiness: 10
|
||||
|
||||
# Sysctl config file
|
||||
sysctl_config_file: /etc/sysctl.d/56-ansible.conf
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
None.
|
||||
|
||||
Example Playbook
|
||||
----------------
|
||||
|
||||
- hosts: all
|
||||
roles:
|
||||
- sysctl_customizations
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
BSD
|
||||
|
||||
Author Information
|
||||
------------------
|
||||
|
||||
This role was created in 2020 by Nemo.
|
8
roles/sysctl_customizations/defaults/main.yml
Normal file
8
roles/sysctl_customizations/defaults/main.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
# defaults file for sysctl_customization
|
||||
|
||||
# Sysctl swapiness value
|
||||
sysctl_vm_swapiness: '10'
|
||||
|
||||
# Sysctl config file
|
||||
sysctl_config_file: /etc/sysctl.d/56-ansible.conf
|
26
roles/sysctl_customizations/meta/main.yml
Normal file
26
roles/sysctl_customizations/meta/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
galaxy_info:
|
||||
author: nemo
|
||||
description: Set up sysctl customizations service for GNU/Linux.
|
||||
company: Wirebrass
|
||||
|
||||
license: license (BSD)
|
||||
|
||||
min_ansible_version: 2.4
|
||||
|
||||
platforms:
|
||||
- name: Debian
|
||||
versions:
|
||||
- stretch
|
||||
- buster
|
||||
- name: Gentoo
|
||||
versions:
|
||||
- all
|
||||
|
||||
galaxy_tags:
|
||||
- sysctl
|
||||
- swapiness
|
||||
- system
|
||||
- server
|
||||
- auto
|
||||
|
||||
dependencies: []
|
3
roles/sysctl_customizations/tasks/main.yml
Normal file
3
roles/sysctl_customizations/tasks/main.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
# Main tasks file for sysctl_customizations
|
||||
- import_tasks: sysctl.yml
|
6
roles/sysctl_customizations/tasks/sysctl.yml
Normal file
6
roles/sysctl_customizations/tasks/sysctl.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
- sysctl:
|
||||
name: vm.swappiness
|
||||
value: "{{ sysctl_vm_swapiness }}"
|
||||
state: present
|
||||
sysctl_file: "{{ sysctl_config_file }}"
|
Loading…
Reference in a new issue