buluma.sysctl

Ansible Role sysctl

This role helps you adjust sysctl settings on your server.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

Here’s a simple example from molecule/default/converge.yml, which is tested regularly.

---
- name: Set sysctl settings
  hosts: all
  become: true
  gather_facts: true

  roles:
    - role: buluma.sysctl
      sysctl_items:
        - name: net.ipv4.ip_forward
          value: 1

Before running this, you should prepare your machine. In CI, it uses molecule/default/prepare.yml:

---
- name: Prepare system
  hosts: all
  become: true
  gather_facts: false

  roles:
    - role: buluma.bootstrap

For more details, check a full explanation and example on using these roles.

Role Variables

Default values for variables are found in defaults/main.yml:

---
# Defaults for sysctl

# Set to true to verify the token with the sysctl command and set with -w if needed
sysctl_set: true

# Set to true to run /sbin/sysctl -p if the sysctl_file is updated
# Set to false to skip reloading sysctl even if the sysctl_file is updated
sysctl_reload: true

Requirements

State of Used Roles

These roles are used to prepare the system. You can also prepare it using other methods.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version

Context

This role works with many other compatible roles. Check the documentation of these roles for more information.

Here’s a summary of related roles:

dependencies

Compatibility

This role has been tested on these container images:

Container Tags
Alpine all
EL 8, 9
Debian all
Fedora all
opensuse all
Ubuntu all

The minimum Ansible version needed is 2.12. Tests have been performed on:

  • The previous version.
  • The current version.
  • The development version.

If you encounter any issues, please report them on GitHub.

Changelog

See the Role History.

License

This role is licensed under Apache-2.0.

Author Information

Created by Shadow Walker.

Informazioni sul progetto

Configure sysctl on your system.

Installa
ansible-galaxy install buluma.sysctl
Licenza
apache-2.0
Download
77.6k
Proprietario
DevOps Engineer