Just an EECE student who likes nerding-out around Linux, infrastructure and security stuff. Pretty much addicted to self-hosting stuff and messing arround with old text editors (cough, Emacs, cough).
Always willing and happy to learn.
Ansible role for tweaking sysctl on Linux systems.
License: MIT License
Just an EECE student who likes nerding-out around Linux, infrastructure and security stuff. Pretty much addicted to self-hosting stuff and messing arround with old text editors (cough, Emacs, cough).
Always willing and happy to learn.
Hi @chzerv when running on Centos 7 (distribution family - Redhat), sysctl_required_packages is not being set correctly.
Assume your task check is matching any instance of Redhat.yml in the playbook, adding a Redhat.yml to your vars directory should resolve the issue.
- name: Set distribution family specific variables.
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_os_family }}.yml"
- default.yml
TASK [chzerv.sysctl : Set distribution family specific variables.] ***************************************************************************************
ok: [yyyy-10] => (item=/Users/doneill/projects/git.xxx.net/zzzz/provisioner/roles/common/vars/RedHat.yml) => {"ansible_facts": {"required_packages": ["the_silver_searcher", "ansible", "yum-utils", "nc", "@Xfce"]}, "ansible_included_var_files": ["/Users/doneill/projects/git.xxx.net/zzzz/provisioner/roles/common/vars/RedHat.yml"], "ansible_loop_var": "item", "changed": false, "item": "/Users/doneill/projects/git.xxx.net/zzzz/provisioner/roles/common/vars/RedHat.yml"}
TASK [chzerv.sysctl : Ensure variables are set correctly.] ***********************************************************************************************
included: /Users/doneill/.ansible/roles/chzerv.sysctl/tasks/variable-check.yml for yyyy-10
TASK [chzerv.sysctl : Ensure that the variable 'sysctl_set' is set correctly.] ***************************************************************************
ok: [yyyy-10] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [chzerv.sysctl : Ensure that the variable 'sysctl_reload' is set correctly.] ************************************************************************
ok: [yyyy-10] => {
"changed": false,
"msg": "All assertions passed"
}
TASK [chzerv.sysctl : Ensure that 'state' is either 'present' or 'absent'.] ******************************************************************************
ok: [yyyy-10] => (item={'name': 'fs.inotify.max_user_watches', 'value': 16384, 'state': 'present'}) => {
"ansible_loop_var": "item",
"changed": false,
"item": {
"name": "fs.inotify.max_user_watches",
"state": "present",
"value": 16384
},
"msg": "All assertions passed"
}
TASK [chzerv.sysctl : Install required packages.] ********************************************************************************************************
fatal: [yyyy-10]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'sysctl_required_packages' is undefined\n\nThe error appears to be in '/Users/doneill/.ansible/roles/chzerv.sysctl/tasks/main.yml': line 11, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Install required packages.\n ^ here\n"}
PLAY RECAP ***********************************************************************************************************************************************
yyyy-10 : ok=42 changed=2 unreachable=0 failed=1 skipped=12 rescued=0 ignored=0
Hi @chzerv thanks for the role, can you tag the repo so that the role can be versioned?
Thanks,
Damian.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.