From 9f3042a83da645392e0a6f6cd4d1409bdad3ea45 Mon Sep 17 00:00:00 2001 From: Claudio Maradonna Date: Mon, 21 Nov 2022 17:54:00 +0100 Subject: [PATCH] fix typo inside multiple README; update last READMEs; update yggdrasil task to explicit uninstall yggdrasil with var --- roles/iptables-ipfs/README.md | 2 +- roles/iptables-persistent/README.md | 4 ++-- roles/iptables-webserver/README.md | 4 ++-- roles/os-updates/README.md | 4 ++-- roles/pi-hole/README.md | 9 ++++----- roles/snort-community/README.md | 26 ++++++++++++++------------ roles/unattended-upgrades/README.md | 20 ++++++++------------ roles/yggdrasil/README.md | 22 ++++++++++------------ roles/yggdrasil/defaults/main.yml | 1 + roles/yggdrasil/tasks/main.yml | 4 +++- 10 files changed, 47 insertions(+), 49 deletions(-) diff --git a/roles/iptables-ipfs/README.md b/roles/iptables-ipfs/README.md index 4adfbda..9615f30 100644 --- a/roles/iptables-ipfs/README.md +++ b/roles/iptables-ipfs/README.md @@ -11,7 +11,7 @@ Requirements Role Variables -------------- -**iptables_ipfs_enabled** (boolean): Enable or disable IPFS rules +- **iptables_ipfs_enabled** (boolean): Enable or disable IPFS rules Dependencies ------------ diff --git a/roles/iptables-persistent/README.md b/roles/iptables-persistent/README.md index a016058..61569e0 100644 --- a/roles/iptables-persistent/README.md +++ b/roles/iptables-persistent/README.md @@ -11,8 +11,8 @@ Requirements Role Variables -------------- -**iptables_persistent_package_name_by_os_family** (array): Each key correspond to [OS family](https://docs.ansible.com/ansible/2.6/user_guide/playbooks_conditionals.html#ansible-os-family), the value correspond to the package name to be installed -**iptables_persistent_save_to_file** (boolean): If true enable file saving with rules +- **iptables_persistent_package_name_by_os_family** (array): Each key correspond to [OS family](https://docs.ansible.com/ansible/2.6/user_guide/playbooks_conditionals.html#ansible-os-family), the value correspond to the package name to be installed +- **iptables_persistent_save_to_file** (boolean): If true enable file saving with rules Dependencies diff --git a/roles/iptables-webserver/README.md b/roles/iptables-webserver/README.md index 1ee1c4b..a455f95 100644 --- a/roles/iptables-webserver/README.md +++ b/roles/iptables-webserver/README.md @@ -11,8 +11,8 @@ Requirements Role Variables -------------- -**iptables_webserver_enabled** (boolean): Enable of disable rules for webserver -**iptables_webserver_ports** (array): Port list dedicated to webserver +- **iptables_webserver_enabled** (boolean): Enable of disable rules for webserver +- **iptables_webserver_ports** (array): Port list dedicated to webserver Dependencies ------------ diff --git a/roles/os-updates/README.md b/roles/os-updates/README.md index 9439132..b602348 100644 --- a/roles/os-updates/README.md +++ b/roles/os-updates/README.md @@ -11,8 +11,8 @@ Requirements Role Variables -------------- -**os_update_auto** (string): If 'reboot' the system will reboot after update, if 'shutdown' will shutdown, else will ignore the parameter -**os_update_auto_delay** (integer): Delay for auto reboot or shutdown +- **os_update_auto** (string): If 'reboot' the system will reboot after update, if 'shutdown' will shutdown, else will ignore the parameter +- **os_update_auto_delay** (integer): Delay for auto reboot or shutdown Dependencies ------------ diff --git a/roles/pi-hole/README.md b/roles/pi-hole/README.md index ff79cd7..483d19d 100644 --- a/roles/pi-hole/README.md +++ b/roles/pi-hole/README.md @@ -11,11 +11,10 @@ Requirements Role Variables -------------- -**pihole_enabled** (boolean): Enable or disable pi-hole support -**pihole_install_custom_list** (boolean): If true will install custom list into the pi-hole database -**pihole_update_gravity** (boolean): If true the dns database will be updated - -**pihole_custom_list** (array): Array of URLs that can be installed as DNS lists. **Actually doesn't clean old lists before install!** +- **pihole_enabled** (boolean): Enable or disable pi-hole support +- **pihole_install_custom_list** (boolean): If true will install custom list into the pi-hole database +- **pihole_update_gravity** (boolean): If true the dns database will be updated +- **pihole_custom_list** (array): Array of URLs that can be installed as DNS lists. **Actually doesn't clean old lists before install!** Dependencies ------------ diff --git a/roles/snort-community/README.md b/roles/snort-community/README.md index 225dd44..933f0e7 100644 --- a/roles/snort-community/README.md +++ b/roles/snort-community/README.md @@ -1,38 +1,40 @@ -Role Name +snort-community ========= -A brief description of the role goes here. +This role install and setup Community rules for target Requirements ------------ -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +. Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +- **snort_community_enabled** (boolean): Enable or disable snort support + +- **snort_package_name_by_os_family** (array): Each key correspond to [OS family](https://docs.ansible.com/ansible/2.6/user_guide/playbooks_conditionals.html#ansible-os-family), the value correspond to the package name to be installed +- **snort_community_group** (string): Name of the group dedicated to snort +- **snort_community_user** (string): Name of the user dedicated to snort +- **snort_symlink_dest** (string): Destination for symlink (complete with name of link) +- **snort_home_net_address** (string): example 192.168.1.0/24 Dependencies ------------ -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. +. Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } +`ansible-playbook -i inventory/example.yml handbook.yml --extra-vars="target=example_target" --tags snort` License ------- -BSD +GPLv3 Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +- [Claudio Maradonna](https://social.unitoo.it/claudio) diff --git a/roles/unattended-upgrades/README.md b/roles/unattended-upgrades/README.md index 225dd44..d7cd0ba 100644 --- a/roles/unattended-upgrades/README.md +++ b/roles/unattended-upgrades/README.md @@ -1,38 +1,34 @@ -Role Name +unattended-upgrades ========= -A brief description of the role goes here. +This role install unattended-upgrades Requirements ------------ -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +. Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +- **unattended_upgrades_enabled** (boolean): If true enable setup for unattended-upgrades Dependencies ------------ -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. +. Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } +`ansible-playbook -i inventory/example.yml os-updates.yml --extra-vars="target=example_target"` License ------- -BSD +GPLv3 Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +- [Claudio Maradonna](https://social.unitoo.it/claudio) diff --git a/roles/yggdrasil/README.md b/roles/yggdrasil/README.md index 225dd44..32bbcd1 100644 --- a/roles/yggdrasil/README.md +++ b/roles/yggdrasil/README.md @@ -1,38 +1,36 @@ -Role Name +yggdrasil ========= -A brief description of the role goes here. +This role install/ uninstall yggdrasil for target Requirements ------------ -Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. +. Role Variables -------------- -A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. +- **yggdrasil_enabled** (boolean): If true install yggdrasil +- **yggdrasil_sshd_enabled** (boolean): If true enable sshd access through Yggdrasil +- **yggdrasil_uninstall** (boolean): if true yggdrasil will be removed from the system (requires *yggdrasil_enabled to false*) Dependencies ------------ -A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. +. Example Playbook ---------------- -Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: - - - hosts: servers - roles: - - { role: username.rolename, x: 42 } +`ansible-playbook -i inventory/example.yml handbook.yml --extra-vars="target=example_target" --tags yggdrasil` License ------- -BSD +GPLv3 Author Information ------------------ -An optional section for the role authors to include contact information, or a website (HTML is not allowed). +- [Claudio Maradonna](https://social.unitoo.it/claudio) diff --git a/roles/yggdrasil/defaults/main.yml b/roles/yggdrasil/defaults/main.yml index 799167a..3dd8fe9 100644 --- a/roles/yggdrasil/defaults/main.yml +++ b/roles/yggdrasil/defaults/main.yml @@ -3,3 +3,4 @@ yggdrasil_enabled: false yggdrasil_sshd_enabled: false +yggdrasil_uninstall: false diff --git a/roles/yggdrasil/tasks/main.yml b/roles/yggdrasil/tasks/main.yml index 3b1136e..6d3350b 100644 --- a/roles/yggdrasil/tasks/main.yml +++ b/roles/yggdrasil/tasks/main.yml @@ -60,7 +60,9 @@ ansible.builtin.shell: ip6tables-save > /etc/iptables/rules.v6 - name: Remove yggdrasil if not enabled - when: "yggdrasil_enabled is false" + when: + - "yggdrasil_enabled is false" + - "yggdrasil_uninstall is true" block: - name: Gather package facts package_facts: