From 8bd24c852fbfe77d2bc8242cda894976aa0df01d Mon Sep 17 00:00:00 2001 From: Warezjoe Date: Thu, 8 Aug 2024 09:39:04 +0200 Subject: [PATCH] role separation --- command-to-run.txt | 2 +- fromdebiantemplate.yml | 5 + inventory | 2 +- proxmox.yml | 16 -- roles/ansible-role-docker/.ansible-lint | 4 - roles/ansible-role-docker/.yamllint | 11 -- roles/ansible-role-docker/LICENSE | 20 --- roles/ansible-role-docker/README.md | 128 ---------------- roles/ansible-role-docker/defaults/main.yml | 49 ------ roles/ansible-role-docker/handlers/main.yml | 7 - roles/ansible-role-docker/meta/main.yml | 41 ------ .../molecule/default/converge.yml | 24 --- .../molecule/default/molecule.yml | 19 --- .../tasks/docker-compose.yml | 31 ---- .../tasks/docker-users.yml | 10 -- roles/ansible-role-docker/tasks/main.yml | 117 --------------- .../tasks/setup-Debian.yml | 50 ------- .../tasks/setup-RedHat.yml | 52 ------- roles/ansible-role-docker/vars/Alpine.yml | 2 - roles/ansible-role-docker/vars/Archlinux.yml | 2 - roles/ansible-role-docker/vars/main.yml | 2 - roles/ansible-role-security/.ansible-lint | 3 - roles/ansible-role-security/.yamllint | 10 -- roles/ansible-role-security/LICENSE | 20 --- roles/ansible-role-security/README.md | 126 ---------------- roles/ansible-role-security/defaults/main.yml | 28 ---- roles/ansible-role-security/handlers/main.yml | 10 -- roles/ansible-role-security/meta/main.yml | 30 ---- .../molecule/default/converge.yml | 44 ------ .../molecule/default/molecule.yml | 21 --- .../tasks/autoupdate-Debian.yml | 16 -- .../tasks/autoupdate-RedHat.yml | 35 ----- .../ansible-role-security/tasks/fail2ban.yml | 29 ---- roles/ansible-role-security/tasks/main.yml | 21 --- roles/ansible-role-security/tasks/ssh.yml | 35 ----- .../templates/10periodic.j2 | 4 - .../templates/50unattended-upgrades.j2 | 20 --- .../templates/jail.local.j2 | 5 - roles/ansible-role-security/vars/Debian.yml | 3 - roles/ansible-role-security/vars/RedHat.yml | 3 - roles/create_samba_user/.travis.yml | 29 ---- roles/create_samba_user/README.md | 38 ----- roles/create_samba_user/defaults/main.yml | 2 - roles/create_samba_user/handlers/main.yml | 6 - roles/create_samba_user/meta/main.yml | 52 ------- roles/create_samba_user/tasks/main.yml | 21 --- roles/create_samba_user/tests/inventory | 2 - roles/create_samba_user/tests/test.yml | 5 - roles/create_samba_user/vars/main.yml | 2 - roles/create_user/.travis.yml | 29 ---- roles/create_user/README.md | 38 ----- roles/create_user/defaults/main.yml | 8 - roles/create_user/handlers/main.yml | 2 - roles/create_user/meta/main.yml | 52 ------- roles/create_user/tasks/main.yml | 48 ------ roles/create_user/tests/inventory | 2 - roles/create_user/tests/test.yml | 5 - roles/create_user/vars/main.yml | 2 - roles/create_zfs_dataset/.travis.yml | 29 ---- roles/create_zfs_dataset/README.md | 38 ----- roles/create_zfs_dataset/defaults/main.yml | 6 - roles/create_zfs_dataset/handlers/main.yml | 2 - roles/create_zfs_dataset/meta/main.yml | 52 ------- roles/create_zfs_dataset/tasks/main.yml | 16 -- roles/create_zfs_dataset/tests/inventory | 2 - roles/create_zfs_dataset/tests/test.yml | 5 - roles/create_zfs_dataset/vars/main.yml | 2 - roles/docker_spin_up/.travis.yml | 29 ---- roles/docker_spin_up/README.md | 38 ----- roles/docker_spin_up/defaults/main.yml | 3 - roles/docker_spin_up/handlers/main.yml | 2 - roles/docker_spin_up/meta/main.yml | 52 ------- .../tasks/dashboard_my_public.yml | 9 -- roles/docker_spin_up/tasks/email.yml | 4 - roles/docker_spin_up/tasks/gitea.yml | 24 --- roles/docker_spin_up/tasks/jellyfin.yml | 29 ---- roles/docker_spin_up/tasks/main.yml | 17 --- roles/docker_spin_up/tasks/monitoring.yml | 82 ----------- roles/docker_spin_up/tasks/nextcloud.yml | 19 --- roles/docker_spin_up/tasks/nginx.yml | 16 -- roles/docker_spin_up/tasks/pi-hole.yml | 20 --- roles/docker_spin_up/tasks/transmission.yaml | 24 --- .../templates/promtail-config.yml | 60 -------- roles/docker_spin_up/tests/inventory | 2 - roles/docker_spin_up/tests/test.yml | 5 - roles/docker_spin_up/vars/main.yml | 2 - roles/gui_app_init/.travis.yml | 29 ---- roles/gui_app_init/README.md | 38 ----- roles/gui_app_init/defaults/main.yml | 2 - roles/gui_app_init/handlers/main.yml | 2 - roles/gui_app_init/meta/main.yml | 52 ------- roles/gui_app_init/tasks/add_steam_repo.yml | 8 - roles/gui_app_init/tasks/add_vscode_repo.yml | 22 --- roles/gui_app_init/tasks/administration.yml | 14 -- roles/gui_app_init/tasks/games.yml | 15 -- roles/gui_app_init/tasks/install_discord.yml | 24 --- roles/gui_app_init/tasks/install_steam.yml | 26 ---- roles/gui_app_init/tasks/main.yml | 7 - roles/gui_app_init/templates/config | 16 -- roles/gui_app_init/tests/inventory | 2 - roles/gui_app_init/tests/test.yml | 5 - roles/gui_app_init/vars/main.yml | 2 - roles/linux_config_init/.travis.yml | 29 ---- roles/linux_config_init/defaults/main.yml | 2 - roles/linux_config_init/handlers/main.yml | 5 - roles/linux_config_init/tasks/bashrc_copy.yml | 17 --- roles/linux_config_init/tasks/create_user.yml | 40 ----- roles/linux_config_init/tasks/git.yml | 7 - .../linux_config_init/tasks/hostname_set.yml | 13 -- roles/linux_config_init/tasks/main.yml | 17 --- .../tasks/resolvconf_copy.yml | 8 - .../linux_config_init/tasks/set_perma_ip.yml | 9 -- .../tasks/sudoer_no_passwd.yml | 8 - roles/linux_config_init/tasks/timezone.yml | 3 - roles/linux_config_init/templates/bashrc | 113 -------------- roles/linux_config_init/templates/etc_hosts | 10 -- .../templates/etc_network_interface | 12 -- roles/linux_config_init/templates/resolvconf | 2 - roles/linux_config_init/vars/main.yml | 2 - roles/mariaDB_install/.travis.yml | 29 ---- roles/mariaDB_install/README.md | 38 ----- roles/mariaDB_install/defaults/main.yml | 2 - roles/mariaDB_install/handlers/main.yml | 6 - roles/mariaDB_install/meta/main.yml | 52 ------- roles/mariaDB_install/tasks/main.yml | 26 ---- roles/mariaDB_install/templates/50-server.cnf | 118 --------------- roles/mariaDB_install/tests/inventory | 2 - roles/mariaDB_install/tests/test.yml | 5 - roles/mariaDB_install/vars/main.yml | 2 - roles/nfs_install/.travis.yml | 29 ---- roles/nfs_install/README.md | 38 ----- roles/nfs_install/defaults/main.yml | 2 - roles/nfs_install/handlers/main.yml | 2 - roles/nfs_install/meta/main.yml | 52 ------- roles/nfs_install/tasks/main.yml | 22 --- roles/nfs_install/tests/inventory | 2 - roles/nfs_install/tests/test.yml | 5 - roles/nfs_install/vars/main.yml | 2 - roles/proxmox/.travis.yml | 29 ---- roles/proxmox/README.md | 38 ----- roles/proxmox/defaults/main.yml | 2 - roles/proxmox/handlers/main.yml | 4 - roles/proxmox/meta/main.yml | 52 ------- roles/proxmox/tasks/iommu.yml | 17 --- roles/proxmox/tasks/main.yml | 9 -- roles/proxmox/tasks/set_community_repo.yml | 23 --- roles/proxmox/tasks/set_wol.yml | 1 - roles/proxmox/templates/grub | 41 ------ roles/proxmox/templates/modules | 12 -- roles/proxmox/tests/inventory | 2 - roles/proxmox/tests/test.yml | 5 - roles/proxmox/vars/main.yml | 2 - roles/samba_install/.travis.yml | 29 ---- roles/samba_install/README.md | 38 ----- roles/samba_install/defaults/main.yml | 2 - roles/samba_install/handlers/main.yml | 6 - roles/samba_install/meta/main.yml | 52 ------- roles/samba_install/tasks/main.yml | 22 --- roles/samba_install/templates/smb.conf | 54 ------- roles/samba_install/tests/inventory | 2 - roles/samba_install/tests/test.yml | 5 - roles/samba_install/vars/main.yml | 2 - roles/tools_for_command_line/.travis.yml | 29 ---- .../tools_for_command_line/defaults/main.yml | 2 - .../tools_for_command_line/handlers/main.yml | 2 - .../tasks/administration.yml | 40 ----- roles/tools_for_command_line/tasks/main.yml | 5 - roles/tools_for_command_line/tests/inventory | 2 - roles/tools_for_command_line/tests/test.yml | 5 - roles/tools_for_command_line/vars/main.yml | 2 - roles/wireguard-server/.travis.yml | 29 ---- roles/wireguard-server/README.md | 38 ----- roles/wireguard-server/defaults/main.yml | 2 - roles/wireguard-server/handlers/main.yml | 6 - roles/wireguard-server/meta/main.yml | 52 ------- roles/wireguard-server/tasks/main.yml | 15 -- .../templates/wireguardclient.conf | 13 -- .../templates/wireguardserver.conf | 18 --- roles/wireguard-server/tests/inventory | 2 - roles/wireguard-server/tests/test.yml | 5 - roles/wireguard-server/vars/main.yml | 2 - roles/zfs_install/.travis.yml | 29 ---- roles/zfs_install/README.md | 38 ----- roles/zfs_install/defaults/main.yml | 2 - roles/zfs_install/handlers/main.yml | 2 - roles/zfs_install/meta/main.yml | 52 ------- roles/zfs_install/tasks/main.yml | 23 --- roles/zfs_install/tests/inventory | 2 - roles/zfs_install/tests/test.yml | 5 - roles/zfs_install/vars/main.yml | 2 - zeus-vars.yml | 1 + zeus.yml | 139 +++++++++++++----- 192 files changed, 113 insertions(+), 3884 deletions(-) create mode 100644 fromdebiantemplate.yml delete mode 100644 proxmox.yml delete mode 100644 roles/ansible-role-docker/.ansible-lint delete mode 100644 roles/ansible-role-docker/.yamllint delete mode 100644 roles/ansible-role-docker/LICENSE delete mode 100644 roles/ansible-role-docker/README.md delete mode 100644 roles/ansible-role-docker/defaults/main.yml delete mode 100644 roles/ansible-role-docker/handlers/main.yml delete mode 100644 roles/ansible-role-docker/meta/main.yml delete mode 100644 roles/ansible-role-docker/molecule/default/converge.yml delete mode 100644 roles/ansible-role-docker/molecule/default/molecule.yml delete mode 100644 roles/ansible-role-docker/tasks/docker-compose.yml delete mode 100644 roles/ansible-role-docker/tasks/docker-users.yml delete mode 100644 roles/ansible-role-docker/tasks/main.yml delete mode 100644 roles/ansible-role-docker/tasks/setup-Debian.yml delete mode 100644 roles/ansible-role-docker/tasks/setup-RedHat.yml delete mode 100755 roles/ansible-role-docker/vars/Alpine.yml delete mode 100644 roles/ansible-role-docker/vars/Archlinux.yml delete mode 100755 roles/ansible-role-docker/vars/main.yml delete mode 100644 roles/ansible-role-security/.ansible-lint delete mode 100644 roles/ansible-role-security/.yamllint delete mode 100644 roles/ansible-role-security/LICENSE delete mode 100644 roles/ansible-role-security/README.md delete mode 100644 roles/ansible-role-security/defaults/main.yml delete mode 100644 roles/ansible-role-security/handlers/main.yml delete mode 100644 roles/ansible-role-security/meta/main.yml delete mode 100644 roles/ansible-role-security/molecule/default/converge.yml delete mode 100644 roles/ansible-role-security/molecule/default/molecule.yml delete mode 100644 roles/ansible-role-security/tasks/autoupdate-Debian.yml delete mode 100644 roles/ansible-role-security/tasks/autoupdate-RedHat.yml delete mode 100644 roles/ansible-role-security/tasks/fail2ban.yml delete mode 100644 roles/ansible-role-security/tasks/main.yml delete mode 100644 roles/ansible-role-security/tasks/ssh.yml delete mode 100644 roles/ansible-role-security/templates/10periodic.j2 delete mode 100644 roles/ansible-role-security/templates/50unattended-upgrades.j2 delete mode 100644 roles/ansible-role-security/templates/jail.local.j2 delete mode 100644 roles/ansible-role-security/vars/Debian.yml delete mode 100644 roles/ansible-role-security/vars/RedHat.yml delete mode 100644 roles/create_samba_user/.travis.yml delete mode 100644 roles/create_samba_user/README.md delete mode 100644 roles/create_samba_user/defaults/main.yml delete mode 100644 roles/create_samba_user/handlers/main.yml delete mode 100644 roles/create_samba_user/meta/main.yml delete mode 100644 roles/create_samba_user/tasks/main.yml delete mode 100644 roles/create_samba_user/tests/inventory delete mode 100644 roles/create_samba_user/tests/test.yml delete mode 100644 roles/create_samba_user/vars/main.yml delete mode 100644 roles/create_user/.travis.yml delete mode 100644 roles/create_user/README.md delete mode 100644 roles/create_user/defaults/main.yml delete mode 100644 roles/create_user/handlers/main.yml delete mode 100644 roles/create_user/meta/main.yml delete mode 100644 roles/create_user/tasks/main.yml delete mode 100644 roles/create_user/tests/inventory delete mode 100644 roles/create_user/tests/test.yml delete mode 100644 roles/create_user/vars/main.yml delete mode 100644 roles/create_zfs_dataset/.travis.yml delete mode 100644 roles/create_zfs_dataset/README.md delete mode 100644 roles/create_zfs_dataset/defaults/main.yml delete mode 100644 roles/create_zfs_dataset/handlers/main.yml delete mode 100644 roles/create_zfs_dataset/meta/main.yml delete mode 100644 roles/create_zfs_dataset/tasks/main.yml delete mode 100644 roles/create_zfs_dataset/tests/inventory delete mode 100644 roles/create_zfs_dataset/tests/test.yml delete mode 100644 roles/create_zfs_dataset/vars/main.yml delete mode 100644 roles/docker_spin_up/.travis.yml delete mode 100644 roles/docker_spin_up/README.md delete mode 100644 roles/docker_spin_up/defaults/main.yml delete mode 100644 roles/docker_spin_up/handlers/main.yml delete mode 100644 roles/docker_spin_up/meta/main.yml delete mode 100644 roles/docker_spin_up/tasks/dashboard_my_public.yml delete mode 100644 roles/docker_spin_up/tasks/email.yml delete mode 100644 roles/docker_spin_up/tasks/gitea.yml delete mode 100644 roles/docker_spin_up/tasks/jellyfin.yml delete mode 100644 roles/docker_spin_up/tasks/main.yml delete mode 100644 roles/docker_spin_up/tasks/monitoring.yml delete mode 100644 roles/docker_spin_up/tasks/nextcloud.yml delete mode 100644 roles/docker_spin_up/tasks/nginx.yml delete mode 100644 roles/docker_spin_up/tasks/pi-hole.yml delete mode 100644 roles/docker_spin_up/tasks/transmission.yaml delete mode 100644 roles/docker_spin_up/templates/promtail-config.yml delete mode 100644 roles/docker_spin_up/tests/inventory delete mode 100644 roles/docker_spin_up/tests/test.yml delete mode 100644 roles/docker_spin_up/vars/main.yml delete mode 100644 roles/gui_app_init/.travis.yml delete mode 100644 roles/gui_app_init/README.md delete mode 100644 roles/gui_app_init/defaults/main.yml delete mode 100644 roles/gui_app_init/handlers/main.yml delete mode 100644 roles/gui_app_init/meta/main.yml delete mode 100644 roles/gui_app_init/tasks/add_steam_repo.yml delete mode 100644 roles/gui_app_init/tasks/add_vscode_repo.yml delete mode 100644 roles/gui_app_init/tasks/administration.yml delete mode 100644 roles/gui_app_init/tasks/games.yml delete mode 100644 roles/gui_app_init/tasks/install_discord.yml delete mode 100644 roles/gui_app_init/tasks/install_steam.yml delete mode 100644 roles/gui_app_init/tasks/main.yml delete mode 100644 roles/gui_app_init/templates/config delete mode 100644 roles/gui_app_init/tests/inventory delete mode 100644 roles/gui_app_init/tests/test.yml delete mode 100644 roles/gui_app_init/vars/main.yml delete mode 100644 roles/linux_config_init/.travis.yml delete mode 100644 roles/linux_config_init/defaults/main.yml delete mode 100644 roles/linux_config_init/handlers/main.yml delete mode 100644 roles/linux_config_init/tasks/bashrc_copy.yml delete mode 100644 roles/linux_config_init/tasks/create_user.yml delete mode 100644 roles/linux_config_init/tasks/git.yml delete mode 100644 roles/linux_config_init/tasks/hostname_set.yml delete mode 100644 roles/linux_config_init/tasks/main.yml delete mode 100644 roles/linux_config_init/tasks/resolvconf_copy.yml delete mode 100644 roles/linux_config_init/tasks/set_perma_ip.yml delete mode 100644 roles/linux_config_init/tasks/sudoer_no_passwd.yml delete mode 100644 roles/linux_config_init/tasks/timezone.yml delete mode 100644 roles/linux_config_init/templates/bashrc delete mode 100644 roles/linux_config_init/templates/etc_hosts delete mode 100644 roles/linux_config_init/templates/etc_network_interface delete mode 100644 roles/linux_config_init/templates/resolvconf delete mode 100644 roles/linux_config_init/vars/main.yml delete mode 100644 roles/mariaDB_install/.travis.yml delete mode 100644 roles/mariaDB_install/README.md delete mode 100644 roles/mariaDB_install/defaults/main.yml delete mode 100644 roles/mariaDB_install/handlers/main.yml delete mode 100644 roles/mariaDB_install/meta/main.yml delete mode 100644 roles/mariaDB_install/tasks/main.yml delete mode 100644 roles/mariaDB_install/templates/50-server.cnf delete mode 100644 roles/mariaDB_install/tests/inventory delete mode 100644 roles/mariaDB_install/tests/test.yml delete mode 100644 roles/mariaDB_install/vars/main.yml delete mode 100644 roles/nfs_install/.travis.yml delete mode 100644 roles/nfs_install/README.md delete mode 100644 roles/nfs_install/defaults/main.yml delete mode 100644 roles/nfs_install/handlers/main.yml delete mode 100644 roles/nfs_install/meta/main.yml delete mode 100644 roles/nfs_install/tasks/main.yml delete mode 100644 roles/nfs_install/tests/inventory delete mode 100644 roles/nfs_install/tests/test.yml delete mode 100644 roles/nfs_install/vars/main.yml delete mode 100644 roles/proxmox/.travis.yml delete mode 100644 roles/proxmox/README.md delete mode 100644 roles/proxmox/defaults/main.yml delete mode 100644 roles/proxmox/handlers/main.yml delete mode 100644 roles/proxmox/meta/main.yml delete mode 100644 roles/proxmox/tasks/iommu.yml delete mode 100644 roles/proxmox/tasks/main.yml delete mode 100644 roles/proxmox/tasks/set_community_repo.yml delete mode 100644 roles/proxmox/tasks/set_wol.yml delete mode 100644 roles/proxmox/templates/grub delete mode 100644 roles/proxmox/templates/modules delete mode 100644 roles/proxmox/tests/inventory delete mode 100644 roles/proxmox/tests/test.yml delete mode 100644 roles/proxmox/vars/main.yml delete mode 100644 roles/samba_install/.travis.yml delete mode 100644 roles/samba_install/README.md delete mode 100644 roles/samba_install/defaults/main.yml delete mode 100644 roles/samba_install/handlers/main.yml delete mode 100644 roles/samba_install/meta/main.yml delete mode 100644 roles/samba_install/tasks/main.yml delete mode 100644 roles/samba_install/templates/smb.conf delete mode 100644 roles/samba_install/tests/inventory delete mode 100644 roles/samba_install/tests/test.yml delete mode 100644 roles/samba_install/vars/main.yml delete mode 100644 roles/tools_for_command_line/.travis.yml delete mode 100644 roles/tools_for_command_line/defaults/main.yml delete mode 100644 roles/tools_for_command_line/handlers/main.yml delete mode 100644 roles/tools_for_command_line/tasks/administration.yml delete mode 100644 roles/tools_for_command_line/tasks/main.yml delete mode 100644 roles/tools_for_command_line/tests/inventory delete mode 100644 roles/tools_for_command_line/tests/test.yml delete mode 100644 roles/tools_for_command_line/vars/main.yml delete mode 100644 roles/wireguard-server/.travis.yml delete mode 100644 roles/wireguard-server/README.md delete mode 100644 roles/wireguard-server/defaults/main.yml delete mode 100644 roles/wireguard-server/handlers/main.yml delete mode 100644 roles/wireguard-server/meta/main.yml delete mode 100644 roles/wireguard-server/tasks/main.yml delete mode 100644 roles/wireguard-server/templates/wireguardclient.conf delete mode 100644 roles/wireguard-server/templates/wireguardserver.conf delete mode 100644 roles/wireguard-server/tests/inventory delete mode 100644 roles/wireguard-server/tests/test.yml delete mode 100644 roles/wireguard-server/vars/main.yml delete mode 100644 roles/zfs_install/.travis.yml delete mode 100644 roles/zfs_install/README.md delete mode 100644 roles/zfs_install/defaults/main.yml delete mode 100644 roles/zfs_install/handlers/main.yml delete mode 100644 roles/zfs_install/meta/main.yml delete mode 100644 roles/zfs_install/tasks/main.yml delete mode 100644 roles/zfs_install/tests/inventory delete mode 100644 roles/zfs_install/tests/test.yml delete mode 100644 roles/zfs_install/vars/main.yml diff --git a/command-to-run.txt b/command-to-run.txt index f500558..400d9fb 100644 --- a/command-to-run.txt +++ b/command-to-run.txt @@ -1,4 +1,4 @@ -ansible-playbook --ask-become-pass -i ~/.ansible/inventory playbook.yml +ansible-playbook --ask-vault-pass -i inventory playbook.yml ansible-galaxy role init {role-to-create} ansible-vault edit vault.yml diff --git a/fromdebiantemplate.yml b/fromdebiantemplate.yml new file mode 100644 index 0000000..160a759 --- /dev/null +++ b/fromdebiantemplate.yml @@ -0,0 +1,5 @@ +--- +- name: Make Debian template uniq + hosts: debiantemplate + become: true + diff --git a/inventory b/inventory index 276b6d3..590c1de 100644 --- a/inventory +++ b/inventory @@ -13,7 +13,7 @@ herodes-public pi-public [Vmbox] - +debiantemplate [all:vars] ansible_connection=ssh diff --git a/proxmox.yml b/proxmox.yml deleted file mode 100644 index a0da455..0000000 --- a/proxmox.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Init for proxmox - hosts: proxmox - become: true - vars: - user: warezjoe - uid: 1000 - user_ssh_key_url: https://github.com/MatousVondrejka.keys - host: herodes # desktop rpi ntb - set_ip: true # false - ip: 192.168.5.6 - roles: - # - role: proxmox - # - role: linux_config_init - - role: tools_for_command_line - # - role: ansible-role-security diff --git a/roles/ansible-role-docker/.ansible-lint b/roles/ansible-role-docker/.ansible-lint deleted file mode 100644 index 2cd8c9f..0000000 --- a/roles/ansible-role-docker/.ansible-lint +++ /dev/null @@ -1,4 +0,0 @@ -skip_list: - - 'yaml' - - 'risky-shell-pipe' - - 'role-name' diff --git a/roles/ansible-role-docker/.yamllint b/roles/ansible-role-docker/.yamllint deleted file mode 100644 index e6fc538..0000000 --- a/roles/ansible-role-docker/.yamllint +++ /dev/null @@ -1,11 +0,0 @@ ---- -extends: default - -rules: - line-length: - max: 200 - level: warning - -ignore: | - .github/stale.yml - .travis.yml diff --git a/roles/ansible-role-docker/LICENSE b/roles/ansible-role-docker/LICENSE deleted file mode 100644 index 4275cf3..0000000 --- a/roles/ansible-role-docker/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Jeff Geerling - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/roles/ansible-role-docker/README.md b/roles/ansible-role-docker/README.md deleted file mode 100644 index 2f23291..0000000 --- a/roles/ansible-role-docker/README.md +++ /dev/null @@ -1,128 +0,0 @@ -# Ansible Role: Docker - -[![CI](https://github.com/geerlingguy/ansible-role-docker/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-docker/actions?query=workflow%3ACI) - -An Ansible Role that installs [Docker](https://www.docker.com) on Linux. - -## Requirements - -None. - -## Role Variables - -Available variables are listed below, along with default values (see `defaults/main.yml`): - - # Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition). - docker_edition: 'ce' - docker_packages: - - "docker-{{ docker_edition }}" - - "docker-{{ docker_edition }}-cli" - - "docker-{{ docker_edition }}-rootless-extras" - docker_packages_state: present - -The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). -You can also specify a specific version of Docker to install using the distribution-specific format: -Red Hat/CentOS: `docker-{{ docker_edition }}-` (Note: you have to add this to all packages); -Debian/Ubuntu: `docker-{{ docker_edition }}=` (Note: you have to add this to all packages). - -You can control whether the package is installed, uninstalled, or at the latest version by setting `docker_package_state` to `present`, `absent`, or `latest`, respectively. Note that the Docker daemon will be automatically restarted if the Docker package is updated. This is a side effect of flushing all handlers (running any of the handlers that have been notified by this and any other role up to this point in the play). - - docker_service_manage: true - docker_service_state: started - docker_service_enabled: true - docker_restart_handler_state: restarted - -Variables to control the state of the `docker` service, and whether it should start on boot. If you're installing Docker inside a Docker container without systemd or sysvinit, you should set `docker_service_manage` to `false`. - - docker_install_compose_plugin: false - docker_compose_package: docker-compose-plugin - docker_compose_package_state: present - -Docker Compose Plugin installation options. These differ from the below in that docker-compose is installed as a docker plugin (and used with `docker compose`) instead of a standalone binary. - - docker_install_compose: true - docker_compose_version: "1.26.0" - docker_compose_arch: "{{ ansible_architecture }}" - docker_compose_path: /usr/local/bin/docker-compose - -Docker Compose installation options. - - docker_repo_url: https://download.docker.com/linux - -The main Docker repo URL, common between Debian and RHEL systems. - - docker_apt_release_channel: stable - docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}" - docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" - docker_apt_ignore_key_error: True - docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg" - -(Used only for Debian/Ubuntu.) You can switch the channel to `nightly` if you want to use the Nightly release. - -You can change `docker_apt_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror. -Usually in combination with changing `docker_apt_repository` as well. - - docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo"docker_edition }}.repo - docker_yum_repo_enable_nightly: '0' - docker_yum_repo_enable_test: '0' - docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg" - -(Used only for RedHat/CentOS.) You can enable the Nightly or Test repo by setting the respective vars to `1`. - -You can change `docker_yum_gpg_key` to a different url if you are behind a firewall or provide a trustworthy mirror. -Usually in combination with changing `docker_yum_repository` as well. - - docker_users: - - user1 - - user2 - -A list of system users to be added to the `docker` group (so they can use Docker on the server). - - docker_daemon_options: - storage-driver: "devicemapper" - log-opts: - max-size: "100m" - -Custom `dockerd` options can be configured through this dictionary representing the json file `/etc/docker/daemon.json`. - -## Use with Ansible (and `docker` Python library) - -Many users of this role wish to also use Ansible to then _build_ Docker images and manage Docker containers on the server where Docker is installed. In this case, you can easily add in the `docker` Python library using the `geerlingguy.pip` role: - -```yaml -- hosts: all - - vars: - pip_install_packages: - - name: docker - - roles: - - geerlingguy.pip - - geerlingguy.docker -``` - -## Dependencies - -None. - -## Example Playbook - -```yaml -- hosts: all - roles: - - geerlingguy.docker -``` - -## License - -MIT / BSD - -## Sponsors - -* [We Manage](https://we-manage.de): Helping start-ups and grown-ups scaling their infrastructure in a sustainable way. - -The above sponsor(s) are supporting Jeff Geerling on [GitHub Sponsors](https://github.com/sponsors/geerlingguy). You can sponsor Jeff's work too, to help him continue improving these Ansible open source projects! - -## Author Information - -This role was created in 2017 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). diff --git a/roles/ansible-role-docker/defaults/main.yml b/roles/ansible-role-docker/defaults/main.yml deleted file mode 100644 index 685b8de..0000000 --- a/roles/ansible-role-docker/defaults/main.yml +++ /dev/null @@ -1,49 +0,0 @@ ---- -# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition). -docker_edition: 'ce' -docker_packages: - - "docker-{{ docker_edition }}" - - "docker-{{ docker_edition }}-cli" - - "docker-{{ docker_edition }}-rootless-extras" - - "containerd.io" -docker_packages_state: present - -# Service options. -docker_service_manage: true -docker_service_state: started -docker_service_enabled: true -docker_restart_handler_state: restarted - -# Docker Compose Plugin options. -docker_install_compose_plugin: false -docker_compose_package: docker-compose-plugin -docker_compose_package_state: present - -# Docker Compose options. -docker_install_compose: true -docker_compose_version: "v2.11.1" -docker_compose_arch: "{{ ansible_architecture }}" -docker_compose_url: "https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-linux-{{ docker_compose_arch }}" -docker_compose_path: /usr/local/bin/docker-compose - -# Docker repo URL. -docker_repo_url: https://download.docker.com/linux - -# Used only for Debian/Ubuntu. Switch 'stable' to 'nightly' if needed. -docker_apt_release_channel: stable -docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}" -docker_apt_repository: "deb [arch={{ docker_apt_arch }}] {{ docker_repo_url }}/{{ ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" -docker_apt_ignore_key_error: true -docker_apt_gpg_key: "{{ docker_repo_url }}/{{ ansible_distribution | lower }}/gpg" - -# Used only for RedHat/CentOS/Fedora. -docker_yum_repo_url: "{{ docker_repo_url }}/{{ (ansible_distribution == 'Fedora') | ternary('fedora','centos') }}/docker-{{ docker_edition }}.repo" -docker_yum_repo_enable_nightly: '0' -docker_yum_repo_enable_test: '0' -docker_yum_gpg_key: "{{ docker_repo_url }}/centos/gpg" - -# A list of users who will be added to the docker group. -docker_users: [] - -# Docker daemon options as a dict -docker_daemon_options: {} diff --git a/roles/ansible-role-docker/handlers/main.yml b/roles/ansible-role-docker/handlers/main.yml deleted file mode 100644 index 72594c8..0000000 --- a/roles/ansible-role-docker/handlers/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: restart docker - service: - name: docker - state: "{{ docker_restart_handler_state }}" - ignore_errors: "{{ ansible_check_mode }}" - when: docker_service_manage | bool diff --git a/roles/ansible-role-docker/meta/main.yml b/roles/ansible-role-docker/meta/main.yml deleted file mode 100644 index edc5f8e..0000000 --- a/roles/ansible-role-docker/meta/main.yml +++ /dev/null @@ -1,41 +0,0 @@ ---- -dependencies: [] - -galaxy_info: - role_name: docker - author: geerlingguy - description: Docker for Linux. - company: "Midwestern Mac, LLC" - license: "license (BSD, MIT)" - min_ansible_version: 2.4 - platforms: - - name: EL - versions: - - 7 - - 8 - - name: Fedora - versions: - - all - - name: Debian - versions: - - buster - - bullseye - - name: Ubuntu - versions: - - bionic - - focal - - jammy - - name: Alpine - version: - - all - - name: ArchLinux - versions: - - all - galaxy_tags: - - web - - system - - containers - - docker - - orchestration - - compose - - server diff --git a/roles/ansible-role-docker/molecule/default/converge.yml b/roles/ansible-role-docker/molecule/default/converge.yml deleted file mode 100644 index 629095b..0000000 --- a/roles/ansible-role-docker/molecule/default/converge.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Converge - hosts: all - become: true - - pre_tasks: - - name: Update apt cache. - apt: update_cache=yes cache_valid_time=600 - when: ansible_os_family == 'Debian' - - - name: Wait for systemd to complete initialization. # noqa 303 - command: systemctl is-system-running - register: systemctl_status - until: > - 'running' in systemctl_status.stdout or - 'degraded' in systemctl_status.stdout - retries: 30 - delay: 5 - when: ansible_service_mgr == 'systemd' - changed_when: false - failed_when: systemctl_status.rc > 1 - - roles: - - role: geerlingguy.docker diff --git a/roles/ansible-role-docker/molecule/default/molecule.yml b/roles/ansible-role-docker/molecule/default/molecule.yml deleted file mode 100644 index d291e5b..0000000 --- a/roles/ansible-role-docker/molecule/default/molecule.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -role_name_check: 1 -dependency: - name: galaxy -driver: - name: docker -platforms: - - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - cgroupns_mode: host - privileged: true - pre_build_image: true -provisioner: - name: ansible - playbooks: - converge: ${MOLECULE_PLAYBOOK:-converge.yml} diff --git a/roles/ansible-role-docker/tasks/docker-compose.yml b/roles/ansible-role-docker/tasks/docker-compose.yml deleted file mode 100644 index 53a4482..0000000 --- a/roles/ansible-role-docker/tasks/docker-compose.yml +++ /dev/null @@ -1,31 +0,0 @@ ---- -- name: Check current docker-compose version. - command: "{{ docker_compose_path }} --version" - register: docker_compose_vsn - check_mode: false - changed_when: false - failed_when: false - -- set_fact: - docker_compose_current_version: "{{ docker_compose_vsn.stdout | regex_search('(\\d+(\\.\\d+)+)') }}" - when: > - docker_compose_vsn.stdout is defined - and (docker_compose_vsn.stdout | length > 0) - -- name: Delete existing docker-compose version if it's different. - file: - path: "{{ docker_compose_path }}" - state: absent - when: > - docker_compose_current_version is defined - and (docker_compose_version | regex_replace('v', '')) not in docker_compose_current_version - -- name: Install Docker Compose (if configured). - get_url: - url: "{{ docker_compose_url }}" - dest: "{{ docker_compose_path }}" - mode: 0755 - when: > - (docker_compose_current_version is not defined) - or (docker_compose_current_version | length == 0) - or (docker_compose_current_version is version((docker_compose_version | regex_replace('v', '')), '<')) diff --git a/roles/ansible-role-docker/tasks/docker-users.yml b/roles/ansible-role-docker/tasks/docker-users.yml deleted file mode 100644 index 6e387e6..0000000 --- a/roles/ansible-role-docker/tasks/docker-users.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Ensure docker users are added to the docker group. - user: - name: "{{ item }}" - groups: docker - append: true - with_items: "{{ docker_users }}" - -- name: Reset ssh connection to apply user changes. - meta: reset_connection diff --git a/roles/ansible-role-docker/tasks/main.yml b/roles/ansible-role-docker/tasks/main.yml deleted file mode 100644 index fe7dc43..0000000 --- a/roles/ansible-role-docker/tasks/main.yml +++ /dev/null @@ -1,117 +0,0 @@ ---- -- name: Load OS-specific vars. - include_vars: "{{ lookup('first_found', params) }}" - vars: - params: - files: - - '{{ansible_distribution}}.yml' - - '{{ansible_os_family}}.yml' - - main.yml - paths: - - 'vars' - -- include_tasks: setup-RedHat.yml - when: ansible_os_family == 'RedHat' - -- include_tasks: setup-Debian.yml - when: ansible_os_family == 'Debian' - -- name: Install Docker packages. - package: - name: "{{ docker_packages }}" - state: "{{ docker_packages_state }}" - notify: restart docker - ignore_errors: "{{ ansible_check_mode }}" - when: "ansible_version.full is version_compare('2.12', '<') or ansible_os_family not in ['RedHat', 'Debian']" - -- name: Install Docker packages (with downgrade option). - package: - name: "{{ docker_packages }}" - state: "{{ docker_packages_state }}" - allow_downgrade: true - notify: restart docker - ignore_errors: "{{ ansible_check_mode }}" - when: "ansible_version.full is version_compare('2.12', '>=') and ansible_os_family in ['RedHat', 'Debian']" - -- name: Install docker-compose plugin. - package: - name: "{{ docker_compose_package }}" - state: "{{ docker_compose_package_state }}" - notify: restart docker - ignore_errors: "{{ ansible_check_mode }}" - when: "docker_install_compose_plugin | bool == true and (ansible_version.full is version_compare('2.12', '<') or ansible_os_family not in ['RedHat', 'Debian'])" - -- name: Install docker-compose-plugin (with downgrade option). - package: - name: "{{ docker_compose_package }}" - state: "{{ docker_compose_package_state }}" - allow_downgrade: true - notify: restart docker - ignore_errors: "{{ ansible_check_mode }}" - when: "docker_install_compose_plugin | bool == true and ansible_version.full is version_compare('2.12', '>=') and ansible_os_family in ['RedHat', 'Debian']" - -- name: Ensure /etc/docker/ directory exists. - file: - path: /etc/docker - state: directory - mode: 0755 - when: docker_daemon_options.keys() | length > 0 - -- name: Configure Docker daemon options. - copy: - content: "{{ docker_daemon_options | to_nice_json }}" - dest: /etc/docker/daemon.json - mode: 0644 - when: docker_daemon_options.keys() | length > 0 - notify: restart docker - -- name: Ensure Docker is started and enabled at boot. - service: - name: docker - state: "{{ docker_service_state }}" - enabled: "{{ docker_service_enabled }}" - ignore_errors: "{{ ansible_check_mode }}" - when: docker_service_manage | bool - -- name: Ensure handlers are notified now to avoid firewall conflicts. - meta: flush_handlers - -- include_tasks: docker-compose.yml - when: docker_install_compose | bool - -- name: Get docker group info using getent. - getent: - database: group - key: docker - split: ':' - when: docker_users | length > 0 - -- name: Check if there are any users to add to the docker group. - set_fact: - at_least_one_user_to_modify: true - when: - - docker_users | length > 0 - - item not in ansible_facts.getent_group["docker"][2] - with_items: "{{ docker_users }}" - -- include_tasks: docker-users.yml - when: at_least_one_user_to_modify is defined - - -- name: Install docker python package - ansible.builtin.pip: - name: docker - extra_args: "--break-system-packages" - -- name: Install a promtail plugin - community.docker.docker_plugin: - plugin_name: grafana/loki-docker-driver:latest - state: present - alias: loki - -- name: Enable a promtail plugin - community.docker.docker_plugin: - plugin_name: grafana/loki-docker-driver:latest - state: enable - alias: loki - notify: restart docker \ No newline at end of file diff --git a/roles/ansible-role-docker/tasks/setup-Debian.yml b/roles/ansible-role-docker/tasks/setup-Debian.yml deleted file mode 100644 index 27ef57b..0000000 --- a/roles/ansible-role-docker/tasks/setup-Debian.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -- name: Ensure old versions of Docker are not installed. - package: - name: - - docker - - docker-engine - state: absent - -- name: Ensure dependencies are installed. - apt: - name: - - apt-transport-https - - ca-certificates - state: present - -- name: Ensure additional dependencies are installed (on Ubuntu < 20.04 and any other systems). - apt: - name: gnupg2 - state: present - when: ansible_distribution != 'Ubuntu' or ansible_distribution_version is version('20.04', '<') - -- name: Ensure additional dependencies are installed (on Ubuntu >= 20.04). - apt: - name: gnupg - state: present - when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '>=') - -- name: Add Docker apt key. - ansible.builtin.get_url: - url: "{{ docker_apt_gpg_key }}" - dest: /etc/apt/trusted.gpg.d/docker.asc - mode: '0644' - force: true - register: add_repository_key - ignore_errors: "{{ docker_apt_ignore_key_error }}" - -- name: Ensure curl is present (on older systems without SNI). - package: name=curl state=present - when: add_repository_key is failed - -- name: Add Docker apt key (alternative for older systems without SNI). - shell: > - curl -sSL {{ docker_apt_gpg_key }} | apt-key add - - when: add_repository_key is failed - -- name: Add Docker repository. - apt_repository: - repo: "{{ docker_apt_repository }}" - state: present - update_cache: true diff --git a/roles/ansible-role-docker/tasks/setup-RedHat.yml b/roles/ansible-role-docker/tasks/setup-RedHat.yml deleted file mode 100644 index 676c9e5..0000000 --- a/roles/ansible-role-docker/tasks/setup-RedHat.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -- name: Ensure old versions of Docker are not installed. - package: - name: - - docker - - docker-common - - docker-engine - state: absent - -- name: Add Docker GPG key. - rpm_key: - key: "{{ docker_yum_gpg_key }}" - state: present - -- name: Add Docker repository. - get_url: - url: "{{ docker_yum_repo_url }}" - dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' - owner: root - group: root - mode: 0644 - -- name: Configure Docker Nightly repo. - ini_file: - dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' - section: 'docker-{{ docker_edition }}-nightly' - option: enabled - value: '{{ docker_yum_repo_enable_nightly }}' - mode: 0644 - no_extra_spaces: true - -- name: Configure Docker Test repo. - ini_file: - dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo' - section: 'docker-{{ docker_edition }}-test' - option: enabled - value: '{{ docker_yum_repo_enable_test }}' - mode: 0644 - no_extra_spaces: true - -- name: Configure containerd on RHEL 8. - block: - - name: Ensure container-selinux is installed. - package: - name: container-selinux - state: present - - - name: Ensure containerd.io is installed. - package: - name: containerd.io - state: present - when: ansible_distribution_major_version | int == 8 diff --git a/roles/ansible-role-docker/vars/Alpine.yml b/roles/ansible-role-docker/vars/Alpine.yml deleted file mode 100755 index b81917a..0000000 --- a/roles/ansible-role-docker/vars/Alpine.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -docker_packages: "docker" diff --git a/roles/ansible-role-docker/vars/Archlinux.yml b/roles/ansible-role-docker/vars/Archlinux.yml deleted file mode 100644 index b81917a..0000000 --- a/roles/ansible-role-docker/vars/Archlinux.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -docker_packages: "docker" diff --git a/roles/ansible-role-docker/vars/main.yml b/roles/ansible-role-docker/vars/main.yml deleted file mode 100755 index 805232b..0000000 --- a/roles/ansible-role-docker/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# Empty file diff --git a/roles/ansible-role-security/.ansible-lint b/roles/ansible-role-security/.ansible-lint deleted file mode 100644 index acc8255..0000000 --- a/roles/ansible-role-security/.ansible-lint +++ /dev/null @@ -1,3 +0,0 @@ -skip_list: - - 'yaml' - - 'role-name' diff --git a/roles/ansible-role-security/.yamllint b/roles/ansible-role-security/.yamllint deleted file mode 100644 index 6dcebf7..0000000 --- a/roles/ansible-role-security/.yamllint +++ /dev/null @@ -1,10 +0,0 @@ ---- -extends: default - -rules: - line-length: - max: 120 - level: warning - -ignore: | - .github/workflows/stale.yml diff --git a/roles/ansible-role-security/LICENSE b/roles/ansible-role-security/LICENSE deleted file mode 100644 index 4275cf3..0000000 --- a/roles/ansible-role-security/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Jeff Geerling - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/roles/ansible-role-security/README.md b/roles/ansible-role-security/README.md deleted file mode 100644 index 4f6f707..0000000 --- a/roles/ansible-role-security/README.md +++ /dev/null @@ -1,126 +0,0 @@ -# Ansible Role: Security (Basics) - -[![CI](https://github.com/geerlingguy/ansible-role-security/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-security/actions?query=workflow%3ACI) - -**First, a major, MAJOR caveat**: the security of your servers is YOUR responsibility. If you think simply including this role and adding a firewall makes a server secure, then you're mistaken. Read up on Linux, network, and application security, and know that no matter how much you know, you can always make every part of your stack more secure. - -That being said, this role performs some basic security configuration on RedHat and Debian-based linux systems. It attempts to: - - - Install software to monitor bad SSH access (fail2ban) - - Configure SSH to be more secure (disabling root login, requiring key-based authentication, and allowing a custom SSH port to be set) - - Set up automatic updates (if configured to do so) - -There are a few other things you may or may not want to do (which are not included in this role) to make sure your servers are more secure, like: - - - Use logwatch or a centralized logging server to analyze and monitor log files - - Securely configure user accounts and SSH keys (this role assumes you're not using password authentication or logging in as root) - - Have a well-configured firewall (check out the `geerlingguy.firewall` role on Ansible Galaxy for a flexible example) - -Again: Your servers' security is *your* responsibility. - -## Requirements - -For obvious reasons, `sudo` must be installed if you want to manage the sudoers file with this role. - -On RedHat/CentOS systems, make sure you have the EPEL repository installed (you can include the `geerlingguy.repo-epel` role to get it installed). - -No special requirements for Debian/Ubuntu systems. - -## Role Variables - -Available variables are listed below, along with default values (see `defaults/main.yml`): - - security_ssh_port: 22 - -The port through which you'd like SSH to be accessible. The default is port 22, but if you're operating a server on the open internet, and have no firewall blocking access to port 22, you'll quickly find that thousands of login attempts per day are not uncommon. You can change the port to a nonstandard port (e.g. 2849) if you want to avoid these thousands of automated penetration attempts. - - security_ssh_password_authentication: "no" - security_ssh_permit_root_login: "no" - security_ssh_usedns: "no" - security_ssh_permit_empty_password: "no" - security_ssh_challenge_response_auth: "no" - security_ssh_gss_api_authentication: "no" - security_ssh_x11_forwarding: "no" - -Security settings for SSH authentication. It's best to leave these set to `"no"`, but there are times (especially during initial server configuration or when you don't have key-based authentication in place) when one or all may be safely set to `'yes'`. **NOTE: It is _very_ important that you quote the 'yes' or 'no' values. Failure to do so may lock you out of your server.** - - security_ssh_allowed_users: [] - # - alice - # - bob - # - charlie - -A list of users allowed to connect to the host over SSH. If no user is defined in the list, the task will be skipped. - - security_ssh_allowed_groups: [] - # - admins - # - devs - -A list of groups allowed to connect to the host over SSH. If no group is defined in the list, the task will be skipped. - - security_sshd_state: started - -The state of the SSH daemon. Typically this should remain `started`. - - security_ssh_restart_handler_state: restarted - -The state of the `restart ssh` handler. Typically this should remain `restarted`. - - security_sudoers_passwordless: [] - security_sudoers_passworded: [] - -A list of users who should be added to the sudoers file so they can run any command as root (via `sudo`) either without a password or requiring a password for each command, respectively. - - security_autoupdate_enabled: true - -Whether to install/enable `yum-cron` (RedHat-based systems) or `unattended-upgrades` (Debian-based systems). System restarts will not happen automatically in any case, and automatic upgrades are no excuse for sloppy patch and package management, but automatic updates can be helpful as yet another security measure. - - security_autoupdate_blacklist: [] - -(Debian/Ubuntu only) A listing of packages that should not be automatically updated. - - security_autoupdate_reboot: false - -(Debian/Ubuntu only) Whether to reboot when needed during unattended upgrades. - - security_autoupdate_reboot_time: "03:00" - -(Debian/Ubuntu only) The time to trigger a reboot, when needed, if `security_autoupdate_reboot` is set to `true`. In 24h "hh:mm" clock format. - - security_autoupdate_mail_to: "" - security_autoupdate_mail_on_error: true - -(Debian/Ubuntu only) If `security_autoupdate_mail_to` is set to an non empty value, unattended upgrades will send an e-mail to that address when some error occurs. You may either set this to a full email: `ops@example.com` or to something like `root`, which will use `/etc/aliases` to route the message. If you set `security_autoupdate_mail_on_error` to `false` you'll get an email after every package install. - - security_fail2ban_enabled: true - -Whether to install/enable `fail2ban`. You might not want to use fail2ban if you're already using some other service for login and intrusion detection (e.g. [ConfigServer](http://configserver.com/cp/csf.html)). - - security_fail2ban_custom_configuration_template: "jail.local.j2" - -The name of the template file used to generate `fail2ban`'s configuration. - -## Dependencies - -None. - -## Example Playbook - - - hosts: servers - vars_files: - - vars/main.yml - roles: - - geerlingguy.security - -*Inside `vars/main.yml`*: - - security_sudoers_passworded: - - johndoe - - deployacct - -## License - -MIT (Expat) / BSD - -## Author Information - -This role was created in 2014 by [Jeff Geerling](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/). diff --git a/roles/ansible-role-security/defaults/main.yml b/roles/ansible-role-security/defaults/main.yml deleted file mode 100644 index b1010a3..0000000 --- a/roles/ansible-role-security/defaults/main.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -security_ssh_port: 22 -security_ssh_password_authentication: "no" -security_ssh_permit_root_login: "no" -security_ssh_usedns: "no" -security_ssh_permit_empty_password: "no" -security_ssh_challenge_response_auth: "no" -security_ssh_gss_api_authentication: "no" -security_ssh_x11_forwarding: "no" -security_sshd_state: started -security_ssh_restart_handler_state: restarted -security_ssh_allowed_users: [] -security_ssh_allowed_groups: [] - -security_sudoers_passwordless: [] -security_sudoers_passworded: [] - -security_autoupdate_enabled: true -security_autoupdate_blacklist: [] - -# Autoupdate mail settings used on Debian/Ubuntu only. -security_autoupdate_reboot: "false" -security_autoupdate_reboot_time: "03:00" -security_autoupdate_mail_to: "" -security_autoupdate_mail_on_error: true - -security_fail2ban_enabled: true -security_fail2ban_custom_configuration_template: "jail.local.j2" diff --git a/roles/ansible-role-security/handlers/main.yml b/roles/ansible-role-security/handlers/main.yml deleted file mode 100644 index beb4e62..0000000 --- a/roles/ansible-role-security/handlers/main.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: restart ssh - service: - name: "{{ security_sshd_name }}" - state: "{{ security_ssh_restart_handler_state }}" - -- name: reload fail2ban - service: - name: fail2ban - state: reloaded diff --git a/roles/ansible-role-security/meta/main.yml b/roles/ansible-role-security/meta/main.yml deleted file mode 100644 index 7e3ac1b..0000000 --- a/roles/ansible-role-security/meta/main.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -dependencies: [] - -galaxy_info: - role_name: security - author: geerlingguy - description: Security software installation and configuration. - company: "Midwestern Mac, LLC" - license: "license (BSD, MIT)" - min_ansible_version: 2.10 - platforms: - - name: Fedora - versions: - - all - - name: Debian - versions: - - all - - name: Ubuntu - versions: - - all - galaxy_tags: - - system - - security - - fail2ban - - automatic - - updates - - yum - - apt - - dnf - - hardening diff --git a/roles/ansible-role-security/molecule/default/converge.yml b/roles/ansible-role-security/molecule/default/converge.yml deleted file mode 100644 index 1271dcf..0000000 --- a/roles/ansible-role-security/molecule/default/converge.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- name: Converge - hosts: all - become: true - - pre_tasks: - - name: Update apt cache. - package: - update_cache: true - cache_valid_time: 600 - when: ansible_os_family == 'Debian' - - - name: Ensure build dependencies are installed (RedHat). - package: - name: - - openssh-server - - openssh-clients - state: present - when: ansible_os_family == 'RedHat' - - - name: Ensure build dependencies are installed (Fedora). - package: - name: procps - state: present - when: ansible_distribution == 'Fedora' - - - name: Ensure build dependencies are installed (Debian). - package: - name: - - openssh-server - - openssh-client - state: present - when: ansible_os_family == 'Debian' - - - name: Ensure auth.log file is present. - copy: - dest: /var/log/auth.log - content: "" - force: false - mode: 0644 - when: ansible_distribution == 'Debian' - - roles: - - role: geerlingguy.security diff --git a/roles/ansible-role-security/molecule/default/molecule.yml b/roles/ansible-role-security/molecule/default/molecule.yml deleted file mode 100644 index 147da5d..0000000 --- a/roles/ansible-role-security/molecule/default/molecule.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -role_name_check: 1 -dependency: - name: galaxy - options: - ignore-errors: true -driver: - name: docker -platforms: - - name: instance - image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux8}-ansible:latest" - command: ${MOLECULE_DOCKER_COMMAND:-""} - volumes: - - /sys/fs/cgroup:/sys/fs/cgroup:rw - cgroupns_mode: host - privileged: true - pre_build_image: true -provisioner: - name: ansible - playbooks: - converge: ${MOLECULE_PLAYBOOK:-converge.yml} diff --git a/roles/ansible-role-security/tasks/autoupdate-Debian.yml b/roles/ansible-role-security/tasks/autoupdate-Debian.yml deleted file mode 100644 index 05aebb7..0000000 --- a/roles/ansible-role-security/tasks/autoupdate-Debian.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: Install unattended upgrades package. - package: - name: unattended-upgrades - state: present - -- name: Copy unattended-upgrades configuration files in place. - template: - src: "{{ item }}.j2" - dest: "/etc/apt/apt.conf.d/{{ item }}" - owner: root - group: root - mode: 0644 - with_items: - - 10periodic - - 50unattended-upgrades diff --git a/roles/ansible-role-security/tasks/autoupdate-RedHat.yml b/roles/ansible-role-security/tasks/autoupdate-RedHat.yml deleted file mode 100644 index 58a058b..0000000 --- a/roles/ansible-role-security/tasks/autoupdate-RedHat.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- name: Set correct automatic update utility vars (RHEL >= 8). - set_fact: - update_utility: dnf-automatic - update_service: dnf-automatic-install.timer - update_conf_path: /etc/dnf/automatic.conf - when: ansible_distribution_major_version | int >= 8 - -- name: Set correct automatic update utility vars (RHEL <= 7). - set_fact: - update_utility: yum-cron - update_service: yum-cron - update_conf_path: /etc/yum/yum-cron.conf - when: ansible_distribution_major_version | int <= 7 - -- name: Install automatic update utility. - package: - name: '{{ update_utility }}' - state: present - -- name: Ensure automatic update utility is running and enabled on boot. - service: - name: '{{ update_service }}' - state: started - enabled: true - -- name: Configure autoupdates. - lineinfile: - dest: '{{ update_conf_path }}' - regexp: '^apply_updates = .+' - line: 'apply_updates = yes' - mode: 0644 - when: - - security_autoupdate_enabled - - ansible_distribution_major_version | int in [7, 8] diff --git a/roles/ansible-role-security/tasks/fail2ban.yml b/roles/ansible-role-security/tasks/fail2ban.yml deleted file mode 100644 index 1b7a7f8..0000000 --- a/roles/ansible-role-security/tasks/fail2ban.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -- name: Install fail2ban (RedHat). - package: - name: fail2ban - state: present - enablerepo: epel - when: ansible_os_family == 'RedHat' - -- name: Install fail2ban (Debian). - package: - name: fail2ban - state: present - when: ansible_os_family == 'Debian' - -- name: Copy fail2ban custom configuration file into place. - template: - src: "{{ security_fail2ban_custom_configuration_template }}" - dest: /etc/fail2ban/jail.local - owner: root - group: root - mode: 0644 - notify: - - reload fail2ban - -- name: Ensure fail2ban is running and enabled on boot. - service: - name: fail2ban - state: started - enabled: true diff --git a/roles/ansible-role-security/tasks/main.yml b/roles/ansible-role-security/tasks/main.yml deleted file mode 100644 index 24e5860..0000000 --- a/roles/ansible-role-security/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -- name: Include OS-specific variables. - include_vars: "{{ ansible_os_family }}.yml" - -# Fail2Ban -- include_tasks: fail2ban.yml - when: security_fail2ban_enabled | bool - -# SSH -- include_tasks: ssh.yml - -# Autoupdate -- include_tasks: autoupdate-RedHat.yml - when: - - ansible_os_family == 'RedHat' - - security_autoupdate_enabled | bool - -- include_tasks: autoupdate-Debian.yml - when: - - ansible_os_family == 'Debian' - - security_autoupdate_enabled | bool diff --git a/roles/ansible-role-security/tasks/ssh.yml b/roles/ansible-role-security/tasks/ssh.yml deleted file mode 100644 index e53cc93..0000000 --- a/roles/ansible-role-security/tasks/ssh.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- name: Ensure SSH daemon is running. - service: - name: "{{ security_sshd_name }}" - state: "{{ security_sshd_state }}" - -- name: Update SSH configuration to be more secure. - lineinfile: - dest: "{{ security_ssh_config_path }}" - regexp: "{{ item.regexp }}" - line: "{{ item.line }}" - state: present - validate: 'sshd -T -f %s' - mode: 0644 - with_items: - - regexp: "^PasswordAuthentication" - line: "PasswordAuthentication {{ security_ssh_password_authentication }}" - - regexp: "^PermitRootLogin" - line: "PermitRootLogin {{ security_ssh_permit_root_login }}" - - regexp: "^Port" - line: "Port {{ security_ssh_port }}" - - regexp: "^UseDNS" - line: "UseDNS {{ security_ssh_usedns }}" - - regexp: "^PermitEmptyPasswords" - line: "PermitEmptyPasswords {{ security_ssh_permit_empty_password }}" - - regexp: "^ChallengeResponseAuthentication" - line: "ChallengeResponseAuthentication {{ security_ssh_challenge_response_auth }}" - - regexp: "^GSSAPIAuthentication" - line: "GSSAPIAuthentication {{ security_ssh_gss_api_authentication }}" - - regexp: "^X11Forwarding" - line: "X11Forwarding {{ security_ssh_x11_forwarding }}" - - regexp: "^ListenAddress" - line: "ListenAddress {{ ip_admin }}" - notify: restart ssh - diff --git a/roles/ansible-role-security/templates/10periodic.j2 b/roles/ansible-role-security/templates/10periodic.j2 deleted file mode 100644 index 5d37e9f..0000000 --- a/roles/ansible-role-security/templates/10periodic.j2 +++ /dev/null @@ -1,4 +0,0 @@ -APT::Periodic::Update-Package-Lists "1"; -APT::Periodic::Download-Upgradeable-Packages "1"; -APT::Periodic::AutocleanInterval "7"; -APT::Periodic::Unattended-Upgrade "1"; diff --git a/roles/ansible-role-security/templates/50unattended-upgrades.j2 b/roles/ansible-role-security/templates/50unattended-upgrades.j2 deleted file mode 100644 index 297f696..0000000 --- a/roles/ansible-role-security/templates/50unattended-upgrades.j2 +++ /dev/null @@ -1,20 +0,0 @@ -Unattended-Upgrade::Automatic-Reboot "{{ security_autoupdate_reboot }}"; -Unattended-Upgrade::Automatic-Reboot-Time "{{ security_autoupdate_reboot_time }}"; - -{% if security_autoupdate_mail_to %} -Unattended-Upgrade::Mail "{{ security_autoupdate_mail_to }}"; -{% if security_autoupdate_mail_on_error %} -Unattended-Upgrade::MailOnlyOnError "true"; -{% endif %} -{% endif %} - -Unattended-Upgrade::Allowed-Origins { - "${distro_id} ${distro_codename}-security"; -// "${distro_id} ${distro_codename}-updates"; -}; - -Unattended-Upgrade::Package-Blacklist{ -{% for package in security_autoupdate_blacklist %} - "{{package}}"; -{% endfor %} -} diff --git a/roles/ansible-role-security/templates/jail.local.j2 b/roles/ansible-role-security/templates/jail.local.j2 deleted file mode 100644 index 90ce1c0..0000000 --- a/roles/ansible-role-security/templates/jail.local.j2 +++ /dev/null @@ -1,5 +0,0 @@ -[sshd] -enabled = true -port = {{ security_ssh_port }} -filter = sshd -backend = systemd diff --git a/roles/ansible-role-security/vars/Debian.yml b/roles/ansible-role-security/vars/Debian.yml deleted file mode 100644 index c66e186..0000000 --- a/roles/ansible-role-security/vars/Debian.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -security_ssh_config_path: /etc/ssh/sshd_config -security_sshd_name: ssh diff --git a/roles/ansible-role-security/vars/RedHat.yml b/roles/ansible-role-security/vars/RedHat.yml deleted file mode 100644 index d7b1921..0000000 --- a/roles/ansible-role-security/vars/RedHat.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -security_ssh_config_path: /etc/ssh/sshd_config -security_sshd_name: sshd diff --git a/roles/create_samba_user/.travis.yml b/roles/create_samba_user/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/create_samba_user/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/create_samba_user/README.md b/roles/create_samba_user/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/create_samba_user/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/create_samba_user/defaults/main.yml b/roles/create_samba_user/defaults/main.yml deleted file mode 100644 index 0bfd24f..0000000 --- a/roles/create_samba_user/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for create_samba_user diff --git a/roles/create_samba_user/handlers/main.yml b/roles/create_samba_user/handlers/main.yml deleted file mode 100644 index 9518990..0000000 --- a/roles/create_samba_user/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# handlers file for create_samba_user -- name: smb restart - service: - name: smb - state: restarted \ No newline at end of file diff --git a/roles/create_samba_user/meta/main.yml b/roles/create_samba_user/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/create_samba_user/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/create_samba_user/tasks/main.yml b/roles/create_samba_user/tasks/main.yml deleted file mode 100644 index 6affe32..0000000 --- a/roles/create_samba_user/tasks/main.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# tasks file for create_samba_user -- name: Create - ansible.builtin.blockinfile: - state: present - owner: root - group: root - insertafter: EOF - path: /etc/samba/smb.conf - mode: '0644' - block: | - [{{ samba_user }}] - comment = {{ samba_user }} samba - path = {{ samba_mountpoint }} - browseable = yes - writeable = yes - read only = no - create mask = 0644 - directory mask = 0755 - valid users = {{ samba_user }} - notify: smb restart \ No newline at end of file diff --git a/roles/create_samba_user/tests/inventory b/roles/create_samba_user/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/create_samba_user/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/create_samba_user/tests/test.yml b/roles/create_samba_user/tests/test.yml deleted file mode 100644 index a94884d..0000000 --- a/roles/create_samba_user/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - create_samba_user diff --git a/roles/create_samba_user/vars/main.yml b/roles/create_samba_user/vars/main.yml deleted file mode 100644 index 17a16b8..0000000 --- a/roles/create_samba_user/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for create_samba_user diff --git a/roles/create_user/.travis.yml b/roles/create_user/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/create_user/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/create_user/README.md b/roles/create_user/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/create_user/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/create_user/defaults/main.yml b/roles/create_user/defaults/main.yml deleted file mode 100644 index e1be6a2..0000000 --- a/roles/create_user/defaults/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# defaults file for create_user -primary_group: "{{ user }}" -secondary_groups: '' -password: '' -shell: "/bin/bash" -home: "/home/{{ user }}" -create_home: "{{ 'false' if (home == '/nonexistent') else 'true'}}" \ No newline at end of file diff --git a/roles/create_user/handlers/main.yml b/roles/create_user/handlers/main.yml deleted file mode 100644 index 32e3928..0000000 --- a/roles/create_user/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for create_user diff --git a/roles/create_user/meta/main.yml b/roles/create_user/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/create_user/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/create_user/tasks/main.yml b/roles/create_user/tasks/main.yml deleted file mode 100644 index ace3b43..0000000 --- a/roles/create_user/tasks/main.yml +++ /dev/null @@ -1,48 +0,0 @@ ---- -# tasks file for create_user -- name: Adding group - ansible.builtin.group: - name: "{{ primary_group }}" - gid: "{{ gid }}" - state: present - when: gid != 65534 - -- name: Adding user - ansible.builtin.user: - name: "{{ user }}" - group: "{{ primary_group }}" - uid: "{{ uid }}" - shell: "{{ shell }}" - groups: "{{ secondary_groups }}" - home: "{{ home }}" - password: "{{ password }}" - create_home: "{{ create_home }}" - -- name: Dowload ssh key - ansible.builtin.uri: - url: "{{ user_ssh_key_url }}" - method: GET - return_content: true - register: ssh_key - when: user_ssh_key_url is defined - -- name: Setting ssh key - ansible.builtin.blockinfile: - state: present - owner: "{{ user }}" - group: "{{ primary_group }}" - insertafter: EOF - path: /home/{{ user }}/.ssh/authorized_keys - mode: '0644' - create: true - block: | - {{ ssh_key.content }} - when: user_ssh_key_url is defined - -- name: Set permissions to .ssh folder - ansible.builtin.file: - path: /home/{{ user }}/.ssh - owner: "{{ user }}" - group: "{{ primary_group }}" - mode: '0711' - when: user_ssh_key_url is defined diff --git a/roles/create_user/tests/inventory b/roles/create_user/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/create_user/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/create_user/tests/test.yml b/roles/create_user/tests/test.yml deleted file mode 100644 index 53baf4f..0000000 --- a/roles/create_user/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - create_user diff --git a/roles/create_user/vars/main.yml b/roles/create_user/vars/main.yml deleted file mode 100644 index df5579e..0000000 --- a/roles/create_user/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for create_user diff --git a/roles/create_zfs_dataset/.travis.yml b/roles/create_zfs_dataset/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/create_zfs_dataset/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/create_zfs_dataset/README.md b/roles/create_zfs_dataset/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/create_zfs_dataset/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/create_zfs_dataset/defaults/main.yml b/roles/create_zfs_dataset/defaults/main.yml deleted file mode 100644 index fa8f2e2..0000000 --- a/roles/create_zfs_dataset/defaults/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# defaults file for create_zfs_dataset -zfs_dataset_size: 10M -zfs_dataset_mountpoint: "/{{ zfs_pool_name }}/{{ zfs_dataset_name }}" -zfs_dataset_user: root -zfs_dataset_group: root diff --git a/roles/create_zfs_dataset/handlers/main.yml b/roles/create_zfs_dataset/handlers/main.yml deleted file mode 100644 index 2dc50ec..0000000 --- a/roles/create_zfs_dataset/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for create_zfs_dataset diff --git a/roles/create_zfs_dataset/meta/main.yml b/roles/create_zfs_dataset/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/create_zfs_dataset/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/create_zfs_dataset/tasks/main.yml b/roles/create_zfs_dataset/tasks/main.yml deleted file mode 100644 index 2198e4f..0000000 --- a/roles/create_zfs_dataset/tasks/main.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# tasks file for create_zfs_dataset -- name: Create zfs dataset - community.general.zfs: - name: "{{ zfs_pool_name }}/{{ zfs_dataset_name }}" - state: present - extra_zfs_properties: - quota: "{{ zfs_dataset_size }}" - mountpoint: "{{ zfs_dataset_mountpoint }}" - -- name: Dir Ownershipt to {{ user }} - ansible.builtin.file: - path: "{{ zfs_dataset_mountpoint }}" - owner: "{{ zfs_dataset_user }}" - group: "{{ zfs_dataset_group }}" - mode: '0731' diff --git a/roles/create_zfs_dataset/tests/inventory b/roles/create_zfs_dataset/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/create_zfs_dataset/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/create_zfs_dataset/tests/test.yml b/roles/create_zfs_dataset/tests/test.yml deleted file mode 100644 index b4850b1..0000000 --- a/roles/create_zfs_dataset/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - create_zfs_dataset diff --git a/roles/create_zfs_dataset/vars/main.yml b/roles/create_zfs_dataset/vars/main.yml deleted file mode 100644 index 8b91343..0000000 --- a/roles/create_zfs_dataset/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for create_zfs_dataset diff --git a/roles/docker_spin_up/.travis.yml b/roles/docker_spin_up/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/docker_spin_up/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/docker_spin_up/README.md b/roles/docker_spin_up/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/docker_spin_up/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/docker_spin_up/defaults/main.yml b/roles/docker_spin_up/defaults/main.yml deleted file mode 100644 index 1935337..0000000 --- a/roles/docker_spin_up/defaults/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -# defaults file for docker_spin_up -docker_homepath: "/{{ zfs_pool_name }}/{{ docker_name }}" diff --git a/roles/docker_spin_up/handlers/main.yml b/roles/docker_spin_up/handlers/main.yml deleted file mode 100644 index 6ffc348..0000000 --- a/roles/docker_spin_up/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for docker_spin_up diff --git a/roles/docker_spin_up/meta/main.yml b/roles/docker_spin_up/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/docker_spin_up/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/docker_spin_up/tasks/dashboard_my_public.yml b/roles/docker_spin_up/tasks/dashboard_my_public.yml deleted file mode 100644 index a360631..0000000 --- a/roles/docker_spin_up/tasks/dashboard_my_public.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: "{{ docker_name }}" - community.docker.docker_container: - name: "{{ docker_name }}" - image: ghcr.io/gethomepage/homepage:latest - ports: - - 3000:3000 - volumes: - - "{{ docker_homepath }}/config:/app/config" # Make sure your local config directory exists \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/email.yml b/roles/docker_spin_up/tasks/email.yml deleted file mode 100644 index 548b794..0000000 --- a/roles/docker_spin_up/tasks/email.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: email - community.docker.docker_container: - \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/gitea.yml b/roles/docker_spin_up/tasks/gitea.yml deleted file mode 100644 index 50c930c..0000000 --- a/roles/docker_spin_up/tasks/gitea.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: gitea - community.docker.docker_container: - image: gitea/gitea:1.19.3 - name: gitea - env: - USER_UID: "1000" - USER_GID: "1000" - GITEA__database__DB_TYPE: "mysql" - GITEA__database__HOST: "{{ mysql_host}}:3306" - GITEA__database__NAME: "{{ GITEA__database__NAME }}" - GITEA__database__USER: "{{ GITEA__database__USER }}" - GITEA__database__PASSWD: "{{ GITEA__database__PASSWD }}" - ROOT_URL: "http://pi-vpn:8082/" - restart_policy: always - networks: - - name: http - volumes: - - "{{ docker_homepath }}/gitea:/data" - - /etc/timezone:/etc/timezone:ro - - /etc/localtime:/etc/localtime:ro - ports: - # - "8082:3000" - - "222:22" \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/jellyfin.yml b/roles/docker_spin_up/tasks/jellyfin.yml deleted file mode 100644 index fd9d613..0000000 --- a/roles/docker_spin_up/tasks/jellyfin.yml +++ /dev/null @@ -1,29 +0,0 @@ -- name: Dir-jellyfin-config - ansible.builtin.file: - path: "{{ docker_homepath }}/config" - owner: "{{ user }}" - group: "{{ primary_group }}" - state: directory - mode: '0711' - -- name: Dir-jellyfin-cache - ansible.builtin.file: - path: "{{ docker_homepath }}/cache" - owner: "{{ user }}" - group: "{{ primary_group }}" - state: directory - mode: '0711' - - -- name: jellyfin - community.docker.docker_container: - name: jellyfin - image: jellyfin/jellyfin:2024042215 - user: "{{ uid }}:{{ gid }}" - volumes: - - "/bigpool/tata/Music:/Music:ro" - - "{{ docker_homepath }}/config:/config" - - "{{ docker_homepath }}/cache:/cache" - restart_policy: unless-stopped - networks: - - name: http \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/main.yml b/roles/docker_spin_up/tasks/main.yml deleted file mode 100644 index 0c16ea8..0000000 --- a/roles/docker_spin_up/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# tasks file for docker_spin_up -#- name: Copy composer -# template: -# src: "../templates/{{ docker_compose_file }}" -# dest: "/{{ docker_homepath }}/docker-compose.yml" -# owner: root -# group: root -# mode: '0644' - -- name: Create a network - community.docker.docker_network: - name: http - -- name: Spin up {{ docker_compose_file }} - ansible.builtin.include_tasks: - "{{ docker_compose_file }}" \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/monitoring.yml b/roles/docker_spin_up/tasks/monitoring.yml deleted file mode 100644 index cb8bea6..0000000 --- a/roles/docker_spin_up/tasks/monitoring.yml +++ /dev/null @@ -1,82 +0,0 @@ ---- -- name: Dir-loki - ansible.builtin.file: - path: "{{ docker_homepath }}/loki-data" - owner: "{{ user }}" - group: "{{ primary_group }}" - state: directory - mode: '0711' - -- name: Dir-grafana - ansible.builtin.file: - path: "{{ docker_homepath }}/grafana-data" - owner: "{{ user }}" - group: "{{ primary_group }}" - state: directory - mode: '0711' - -- name: Dir-promtail - ansible.builtin.file: - path: "{{ docker_homepath }}/promtail-data" - owner: "{{ user }}" - group: "{{ primary_group }}" - state: directory - mode: '0711' - -- name: promtail config copy - template: - src: ../templates/promtail-config.yml - dest: "{{ docker_homepath }}/promtail-data/promtail-config.yml" - owner: "{{ user}}" - group: "{{ primary_group }}" - mode: '0644' - -- name: loki - community.docker.docker_container: - name: loki - user: "{{ uid }}:{{ gid }}" - image: 'grafana/loki:main-2c878c8' - restart_policy: unless-stopped - #ports: - # - '3100:3100' - volumes: - - "{{ docker_homepath }}/loki-data:/loki" - - "/etc/resolv.conf:/etc/resolv.conf:ro" - - "/etc/timezone:/etc/timezone:ro" - - "/etc/localtime:/etc/localtime:ro" - networks: - - name: http - -- name: grafana - community.docker.docker_container: - name: grafana - image: 'grafana/grafana:10.2.6' - user: "{{ uid }}:{{ gid }}" - restart_policy: unless-stopped - #ports: - # - '3000:3000' - volumes: - - "{{ docker_homepath }}/grafana-data:/var/lib/grafana" - - "/etc/timezone:/etc/timezone:ro" - - "/etc/localtime:/etc/localtime:ro" - networks: - - name: http - -- name: promtail - community.docker.docker_container: - name: promtail - image: 'grafana/promtail:main-e2952b9' - user: "0:0" - restart_policy: unless-stopped - command: -config.file=/etc/promtail/promtail-config.yml -config.expand-env=true - #ports: - # - '3000:3000' - volumes: - - "{{ docker_homepath }}/promtail-data:/etc/promtail" - - "/var/log:/var/log:ro" - - "/run/log/journal/:/run/log/journal/:ro" - - "/etc/machine-id:/etc/machine-id:ro" - - "/etc/timezone:/etc/timezone:ro" - - "/etc/localtime:/etc/localtime:ro" - networks: - - name: http \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/nextcloud.yml b/roles/docker_spin_up/tasks/nextcloud.yml deleted file mode 100644 index 6763b4a..0000000 --- a/roles/docker_spin_up/tasks/nextcloud.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: nextcloud - community.docker.docker_container: - name: nextcloud - image: nextcloud:26.0-fpm - restart_policy: always -# ports: -# - 8080:80 - volumes: - - "{{ docker_homepath }}/nextcloud_nextcloud_1/_data:/var/www/html" - env: - MYSQL_PASSWORD: "{{ NEXTCLOUD_MYSQL_PASSWORD }}" - MYSQL_DATABASE: "{{ NEXTCLOUD_MYSQL_DATABASE }}" - MYSQL_USER: "{{ NEXTCLOUD_MYSQL_USER }}" - MYSQL_HOST: "{{ mysql_host }}" - PHP_MEMORY_LIMIT: 2G - PHP_UPLOAD_LIMIT: 10G - networks: - - name: http \ No newline at end of file diff --git a/roles/docker_spin_up/tasks/nginx.yml b/roles/docker_spin_up/tasks/nginx.yml deleted file mode 100644 index da15db7..0000000 --- a/roles/docker_spin_up/tasks/nginx.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- name: nginx - community.docker.docker_container: - name: nginx - image: 'jc21/nginx-proxy-manager:latest' - restart_policy: unless-stopped - ports: - - '80:80' - #- "{{ ip_admin }}:81:81" - - '443:443' - volumes: - - "{{ docker_homepath }}/data:/data" - - "{{ docker_homepath }}/letsencrypt:/etc/letsencrypt" - - "/bigpool/nextcloud/nextcloud_nextcloud_1/_data/:/var/www/html:ro" - networks: - - name: http diff --git a/roles/docker_spin_up/tasks/pi-hole.yml b/roles/docker_spin_up/tasks/pi-hole.yml deleted file mode 100644 index be5b31f..0000000 --- a/roles/docker_spin_up/tasks/pi-hole.yml +++ /dev/null @@ -1,20 +0,0 @@ -- name: pi-hole - community.docker.docker_container: - name: pi-hole - image: pihole/pihole:2024.03.2 - # For DHCP it is recommended to remove these ports and instead add: network_mode: "host" - ports: - - "53:53/tcp" - - "53:53/udp" - # - "8092:80/tcp" - env: - TZ: 'Europe/Prague' - WEBPASSWORD: "{{ password }}" - # Volumes store your data between container upgrades - volumes: - - "{{ docker_homepath }}/etc-pihole:/etc/pihole" - - "{{ docker_homepath }}/etc-dnsmasq.d:/etc/dnsmasq.d" - # https://github.com/pi-hole/docker-pi-hole#note-on-capabilities - restart_policy: unless-stopped - networks: - - name: http diff --git a/roles/docker_spin_up/tasks/transmission.yaml b/roles/docker_spin_up/tasks/transmission.yaml deleted file mode 100644 index 6ca1487..0000000 --- a/roles/docker_spin_up/tasks/transmission.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: transmission - community.docker.docker_container: - name: transmission - image: lscr.io/linuxserver/transmission:latest - #container_name: transmission - env: - PUID: "{{ uid }}" - PGID: "{{ uid }}" - TZ: Europe/Berlin - #TRANSMISSION_WEB_HOME=/combustion-release/ #optional - USER: "{{ user }}" #optional - PASS: "{{ password }}" #optional - volumes: - # - /path/to/data:/config - - "{{ docker_homepath }}/downloads:/downloads" - - "{{ docker_homepath }}/watch:/watch" - #ports: - # - 9091:9091 - # - 51413:51413 - # - 51413:51413/udp - restart_policy: unless-stopped - networks: - - name: http diff --git a/roles/docker_spin_up/templates/promtail-config.yml b/roles/docker_spin_up/templates/promtail-config.yml deleted file mode 100644 index c70257c..0000000 --- a/roles/docker_spin_up/templates/promtail-config.yml +++ /dev/null @@ -1,60 +0,0 @@ -server: - http_listen_port: 9080 - grpc_listen_port: 0 -positions: - filename: /tmp/positions.yaml -clients: - - url: http://loki:3100/loki/api/v1/push - #- url: https://loki.internal.matous.vondrejka.cz/loki/api/v1/push - -scrape_configs: - - job_name: journal - journal: - json: false - max_age: 12h - path: /var/log/journal - labels: - job: systemd-journal - relabel_configs: - - source_labels: ['__journal__systemd_unit'] - target_label: 'unit' - - - - job_name: docker - static_configs: - - targets: - - localhost - labels: - job: containerlogs - __path__: /var/lib/docker/containers/*/*log - - pipeline_stages: - - json: - expressions: - output: log - stream: stream - attrs: - - json: - expressions: - tag: - source: attrs - - regex: - expression: (?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])).(?P(?:[^|]*[^|])) - source: tag - - timestamp: - format: RFC3339Nano - source: time - - labels: - tag: - stream: - image_name: - container_name: - image_id: - container_id: - - output: - source: output/*-json.log - - -#scrape_configs: -#- job_name: journald -# journal: {} diff --git a/roles/docker_spin_up/tests/inventory b/roles/docker_spin_up/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/docker_spin_up/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/docker_spin_up/tests/test.yml b/roles/docker_spin_up/tests/test.yml deleted file mode 100644 index 6041d25..0000000 --- a/roles/docker_spin_up/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - docker_spin_up diff --git a/roles/docker_spin_up/vars/main.yml b/roles/docker_spin_up/vars/main.yml deleted file mode 100644 index c225738..0000000 --- a/roles/docker_spin_up/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for docker_spin_up diff --git a/roles/gui_app_init/.travis.yml b/roles/gui_app_init/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/gui_app_init/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/gui_app_init/README.md b/roles/gui_app_init/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/gui_app_init/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/gui_app_init/defaults/main.yml b/roles/gui_app_init/defaults/main.yml deleted file mode 100644 index 0fec7ef..0000000 --- a/roles/gui_app_init/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for gui_app_init diff --git a/roles/gui_app_init/handlers/main.yml b/roles/gui_app_init/handlers/main.yml deleted file mode 100644 index a6a1a12..0000000 --- a/roles/gui_app_init/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for gui_app_init diff --git a/roles/gui_app_init/meta/main.yml b/roles/gui_app_init/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/gui_app_init/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/gui_app_init/tasks/add_steam_repo.yml b/roles/gui_app_init/tasks/add_steam_repo.yml deleted file mode 100644 index 4ea5cbb..0000000 --- a/roles/gui_app_init/tasks/add_steam_repo.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Add repository for steam - become: true - ansible.builtin.dnf: - name: - - fedora-workstation-repositories - state: present - when: ansible_os_family == "RedHat" diff --git a/roles/gui_app_init/tasks/add_vscode_repo.yml b/roles/gui_app_init/tasks/add_vscode_repo.yml deleted file mode 100644 index 5b95ccd..0000000 --- a/roles/gui_app_init/tasks/add_vscode_repo.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Add repository for vscode for "RedHat" - become: true - ansible.builtin.yum_repository: - name: vscode - description: Adding repo for vscode - baseurl: https://packages.microsoft.com/yumrepos/vscode - gpgkey: https://packages.microsoft.com/keys/microsoft.asc - when: ansible_os_family == "RedHat" - -- name: Add gpg key for vscode for "Debian" - become: true - ansible.builtin.apt_key: - url: https://packages.microsoft.com/keys/microsoft.asc - state: present - -- name: Add repository for vscode for "Debian" - become: true - ansible.builtin.apt_repository: - repo: deb https://packages.microsoft.com/repos/code stable main - #gpgkey: https://packages.microsoft.com/keys/microsoft.asc - when: ansible_os_family == "Debian" \ No newline at end of file diff --git a/roles/gui_app_init/tasks/administration.yml b/roles/gui_app_init/tasks/administration.yml deleted file mode 100644 index 39c3e36..0000000 --- a/roles/gui_app_init/tasks/administration.yml +++ /dev/null @@ -1,14 +0,0 @@ ---- - -- name: Add repos - ansible.builtin.include_tasks: add_vscode_repo.yml - -- name: Administration tools install - become: true - ansible.builtin.package: - name: - - libreoffice-base - - code - - terminator - state: present - diff --git a/roles/gui_app_init/tasks/games.yml b/roles/gui_app_init/tasks/games.yml deleted file mode 100644 index bdd30b4..0000000 --- a/roles/gui_app_init/tasks/games.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: Steam and Discord - ansible.builtin.include_tasks: "{{ item }}" - loop: - - add_steam_repo.yml - - install_steam.yml - - install_discord.yml - - -- name: Stuff for run games - become: true - ansible.builtin.package: - name: - - wine - state: present diff --git a/roles/gui_app_init/tasks/install_discord.yml b/roles/gui_app_init/tasks/install_discord.yml deleted file mode 100644 index 74136c4..0000000 --- a/roles/gui_app_init/tasks/install_discord.yml +++ /dev/null @@ -1,24 +0,0 @@ ---- -- name: Fedora version fetch - shell: | - rpm -E %fedora - register: prefedora_ver - when: ansible_os_family == "RedHat" - -- name: Set fact - set_fact: - fedora_ver: "{{ prefedora_ver.stdout }}" - when: ansible_os_family == "RedHat" - -- name: Add repo Discord repo for (Rhel) Fedora - become: true - ansible.builtin.dnf: - name: 'https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-{{ fedora_ver }}.noarch.rpm' - state: present - when: ansible_os_family == "RedHat" - -- name: Discord install fedora - become: true - ansible.builtin.dnf: - name: discord - when: ansible_os_family == "RedHat" diff --git a/roles/gui_app_init/tasks/install_steam.yml b/roles/gui_app_init/tasks/install_steam.yml deleted file mode 100644 index fe51fc3..0000000 --- a/roles/gui_app_init/tasks/install_steam.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- name: Steam install "RedHat" - become: true - ansible.builtin.dnf: - name: steam - enablerepo: rpmfusion-nonfree-steam - when: ansible_os_family == "RedHat" - -- name: Add gpg key for steam for "Debian" - become: true - ansible.builtin.apt_key: - url: http://repo.steampowered.com/steam/archive/stable/steam.gpg - state: present - -- name: Add repository for steam for "Debian" - become: true - ansible.builtin.apt_repository: - repo: deb http://repo.steampowered.com/steam/ stable steam - when: ansible_os_family == "Debian" - -- name: Install Steam "Debian" - become: true - ansible.builtin.apt: - name: steam-launcher - state: present - diff --git a/roles/gui_app_init/tasks/main.yml b/roles/gui_app_init/tasks/main.yml deleted file mode 100644 index 73494c3..0000000 --- a/roles/gui_app_init/tasks/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -# tasks file for gui_app_init -- name: Administration - ansible.builtin.include_tasks: "{{ item }}" - loop: - - administration.yml - - games.yml \ No newline at end of file diff --git a/roles/gui_app_init/templates/config b/roles/gui_app_init/templates/config deleted file mode 100644 index 59e622e..0000000 --- a/roles/gui_app_init/templates/config +++ /dev/null @@ -1,16 +0,0 @@ -[global_config] -[keybindings] -[profiles] - [[default]] - cursor_color = "#aaaaaa" - font = Hack Nerd Font Mono 14 - use_system_font = False -[layouts] - [[default]] - [[[window0]]] - type = Window - parent = "" - [[[child1]]] - type = Terminal - parent = window0 -[plugins] diff --git a/roles/gui_app_init/tests/inventory b/roles/gui_app_init/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/gui_app_init/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/gui_app_init/tests/test.yml b/roles/gui_app_init/tests/test.yml deleted file mode 100644 index 4ec293c..0000000 --- a/roles/gui_app_init/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - gui_app_init diff --git a/roles/gui_app_init/vars/main.yml b/roles/gui_app_init/vars/main.yml deleted file mode 100644 index 34ccccb..0000000 --- a/roles/gui_app_init/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for gui_app_init diff --git a/roles/linux_config_init/.travis.yml b/roles/linux_config_init/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/linux_config_init/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/linux_config_init/defaults/main.yml b/roles/linux_config_init/defaults/main.yml deleted file mode 100644 index 905ee61..0000000 --- a/roles/linux_config_init/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for linux_config_tinker diff --git a/roles/linux_config_init/handlers/main.yml b/roles/linux_config_init/handlers/main.yml deleted file mode 100644 index bbf1c09..0000000 --- a/roles/linux_config_init/handlers/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- name: networking restart - service: - name: networking - state: restarted \ No newline at end of file diff --git a/roles/linux_config_init/tasks/bashrc_copy.yml b/roles/linux_config_init/tasks/bashrc_copy.yml deleted file mode 100644 index 85fa0af..0000000 --- a/roles/linux_config_init/tasks/bashrc_copy.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Copy /root/.bashrc - template: - src: ../templates/bashrc - dest: /root/.bashrc - owner: root - group: root - mode: '0644' - - -- name: Copy /home/{{ user }}/.bashrc - template: - src: ../templates/bashrc - dest: /home/{{ user }}/.bashrc - owner: "{{ user }}" - group: "{{ user }}" - mode: '0644' \ No newline at end of file diff --git a/roles/linux_config_init/tasks/create_user.yml b/roles/linux_config_init/tasks/create_user.yml deleted file mode 100644 index 95ec34a..0000000 --- a/roles/linux_config_init/tasks/create_user.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- name: Adding group - ansible.builtin.group: - name: "{{ user }}" - state: present - gid: "{{ uid }}" - -- name: Adding user - ansible.builtin.user: - name: "{{ user }}" - group: "{{ user }}" - uid: "{{ uid }}" - shell: /bin/bash - groups: sudo - -- name: Dowload ssh key - ansible.builtin.uri: - url: "{{ user_ssh_key_url }}" - method: GET - return_content: true - register: ssh_key - -- name: Setting ssh key - ansible.builtin.blockinfile: - state: present - owner: "{{ user }}" - group: "{{ user }}" - insertafter: EOF - path: /home/{{ user }}/.ssh/authorized_keys - mode: '0644' - create: true - block: | - {{ ssh_key.content }} - -- name: Set permissions to .ssh folder - ansible.builtin.file: - path: /home/{{ user }}/.ssh - owner: "{{ user }}" - group: "{{ user }}" - mode: '0711' diff --git a/roles/linux_config_init/tasks/git.yml b/roles/linux_config_init/tasks/git.yml deleted file mode 100644 index e35c595..0000000 --- a/roles/linux_config_init/tasks/git.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -- name: Get git - become: true - ansible.builtin.package: - name: - - git - state: present diff --git a/roles/linux_config_init/tasks/hostname_set.yml b/roles/linux_config_init/tasks/hostname_set.yml deleted file mode 100644 index f5ebd7d..0000000 --- a/roles/linux_config_init/tasks/hostname_set.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- name: Copy /etc/hosts - template: - src: ../templates/etc_hosts - dest: /etc/hosts - owner: root - group: root - mode: '0664' - - -- name: Set a hostname - ansible.builtin.hostname: - name: "{{ host }}" \ No newline at end of file diff --git a/roles/linux_config_init/tasks/main.yml b/roles/linux_config_init/tasks/main.yml deleted file mode 100644 index ef3c783..0000000 --- a/roles/linux_config_init/tasks/main.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# tasks file for linux_config_init -- name: System settings - ansible.builtin.include_tasks: "{{ item }}" - loop: - - sudoer_no_passwd.yml - - hostname_set.yml - - git.yml -# - create_user.yml -# - set_perma_ip.yml - - bashrc_copy.yml - - timezone.yml - - resolvconf_copy.yml - -#- name: Set Pernament IP -# ansible.builtin.include_tasks: set_perma_ip.yml -# when: set_ip diff --git a/roles/linux_config_init/tasks/resolvconf_copy.yml b/roles/linux_config_init/tasks/resolvconf_copy.yml deleted file mode 100644 index 044f8aa..0000000 --- a/roles/linux_config_init/tasks/resolvconf_copy.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Copy /etc/network/interfaces - template: - src: ../templates/resolvconf - dest: /etc/resolv.conf - owner: root - group: root - mode: '0644' \ No newline at end of file diff --git a/roles/linux_config_init/tasks/set_perma_ip.yml b/roles/linux_config_init/tasks/set_perma_ip.yml deleted file mode 100644 index c5ef132..0000000 --- a/roles/linux_config_init/tasks/set_perma_ip.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -- name: Copy /etc/network/interfaces - template: - src: ../templates/etc_network_interface - dest: /etc/network/interfaces - owner: root - group: root - mode: '0644' - notify: networking restart diff --git a/roles/linux_config_init/tasks/sudoer_no_passwd.yml b/roles/linux_config_init/tasks/sudoer_no_passwd.yml deleted file mode 100644 index 561a3b6..0000000 --- a/roles/linux_config_init/tasks/sudoer_no_passwd.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: No password for sudo - become: true - community.general.sudoers: - nopassword: true - commands: ALL - user: "{{ user }}" - name: No password for sudo diff --git a/roles/linux_config_init/tasks/timezone.yml b/roles/linux_config_init/tasks/timezone.yml deleted file mode 100644 index 50f18c9..0000000 --- a/roles/linux_config_init/tasks/timezone.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: Set timezone to Europe/Prague - community.general.timezone: - name: Europe/Prague \ No newline at end of file diff --git a/roles/linux_config_init/templates/bashrc b/roles/linux_config_init/templates/bashrc deleted file mode 100644 index 708aafa..0000000 --- a/roles/linux_config_init/templates/bashrc +++ /dev/null @@ -1,113 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - alias grep='grep --color=auto' - alias fgrep='fgrep --color=auto' - alias egrep='egrep --color=auto' -fi - -# colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# some more ls aliases -alias ll='ls -lah' -alias la='ls -A' -alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi \ No newline at end of file diff --git a/roles/linux_config_init/templates/etc_hosts b/roles/linux_config_init/templates/etc_hosts deleted file mode 100644 index a00a0dd..0000000 --- a/roles/linux_config_init/templates/etc_hosts +++ /dev/null @@ -1,10 +0,0 @@ -127.0.0.1 localhost.localdomain localhost -{{ ip }} {{ host }} -# The following lines are desirable for IPv6 capable hosts - -::1 ip6-localhost ip6-loopback -fe00::0 ip6-localnet -ff00::0 ip6-mcastprefix -ff02::1 ip6-allnodes -ff02::2 ip6-allrouters -ff02::3 ip6-allhosts \ No newline at end of file diff --git a/roles/linux_config_init/templates/etc_network_interface b/roles/linux_config_init/templates/etc_network_interface deleted file mode 100644 index 9c9b0d4..0000000 --- a/roles/linux_config_init/templates/etc_network_interface +++ /dev/null @@ -1,12 +0,0 @@ -auto lo -iface lo inet loopback - -auto {{ in_face }} -iface {{ in_face }} inet static -address {{ ip }}/24 - -iface {{ in_face }} inet static -address {{ ip_admin }}/24 - -gateway 192.168.5.1 -source /etc/network/interfaces.d/* diff --git a/roles/linux_config_init/templates/resolvconf b/roles/linux_config_init/templates/resolvconf deleted file mode 100644 index 767c5a5..0000000 --- a/roles/linux_config_init/templates/resolvconf +++ /dev/null @@ -1,2 +0,0 @@ -nameserver 192.168.6.7 -nameserver 8.8.8.8 diff --git a/roles/linux_config_init/vars/main.yml b/roles/linux_config_init/vars/main.yml deleted file mode 100644 index 934b677..0000000 --- a/roles/linux_config_init/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for linux_config_tinker diff --git a/roles/mariaDB_install/.travis.yml b/roles/mariaDB_install/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/mariaDB_install/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/mariaDB_install/README.md b/roles/mariaDB_install/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/mariaDB_install/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/mariaDB_install/defaults/main.yml b/roles/mariaDB_install/defaults/main.yml deleted file mode 100644 index d7a2158..0000000 --- a/roles/mariaDB_install/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for mariaDB_install diff --git a/roles/mariaDB_install/handlers/main.yml b/roles/mariaDB_install/handlers/main.yml deleted file mode 100644 index 56b658a..0000000 --- a/roles/mariaDB_install/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# handlers file for mariaDB_install -- name: mariadb restart - service: - name: mariadb - state: restarted \ No newline at end of file diff --git a/roles/mariaDB_install/meta/main.yml b/roles/mariaDB_install/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/mariaDB_install/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/mariaDB_install/tasks/main.yml b/roles/mariaDB_install/tasks/main.yml deleted file mode 100644 index d65b2d6..0000000 --- a/roles/mariaDB_install/tasks/main.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -# tasks file for mariaDB_install -- name: Install - ansible.builtin.package: - name: - - mariadb-server - state: present - - -- name: Check version - shell: dpkg -l | grep mariadb-server | awk '{print $3}' | head -n 1 | awk -F ":" '{print $2}' | cut -d '.' -f 1,2 - register: mariadb_server_ver - -#- name: Print version -# ansible.builtin.debug: -# msg: "{{ mariadb_server_ver.stdout }}" - - -- name: Copy config - template: - src: ../templates/50-server.cnf - dest: /etc/mysql/mariadb.conf.d/50-server.cnf - owner: root - group: root - mode: '0644' - notify: mariadb restart diff --git a/roles/mariaDB_install/templates/50-server.cnf b/roles/mariaDB_install/templates/50-server.cnf deleted file mode 100644 index a3b3e91..0000000 --- a/roles/mariaDB_install/templates/50-server.cnf +++ /dev/null @@ -1,118 +0,0 @@ -# -# These groups are read by MariaDB server. -# Use it for options that only the server (but not clients) should see - -# this is read by the standalone daemon and embedded servers -[server] - -# this is only for the mysqld standalone daemon -[mysqld] - -# -# * Basic Settings -# - -user = mysql -pid-file = /run/mysqld/mysqld.pid -basedir = /usr -#datadir = /var/lib/mysql -datadir = {{ mariadb_location }} -tmpdir = /tmp -lc-messages-dir = /usr/share/mysql -lc-messages = en_US -skip-external-locking - -# Broken reverse DNS slows down connections considerably and name resolve is -# safe to skip if there are no "host by domain name" access grants -#skip-name-resolve - -# Instead of skip-networking the default is now to listen only on -# localhost which is more compatible and is not less secure. -bind-address = 0.0.0.0 - -# -# * Fine Tuning -# - -#key_buffer_size = 128M -#max_allowed_packet = 1G -#thread_stack = 192K -#thread_cache_size = 8 -# This replaces the startup script and checks MyISAM tables if needed -# the first time they are touched -#myisam_recover_options = BACKUP -#max_connections = 100 -#table_cache = 64 - -# -# * Logging and Replication -# - -# Both location gets rotated by the cronjob. -# Be aware that this log type is a performance killer. -# Recommend only changing this at runtime for short testing periods if needed! -#general_log_file = /var/log/mysql/mysql.log -#general_log = 1 - -# When running under systemd, error logging goes via stdout/stderr to journald -# and when running legacy init error logging goes to syslog due to -# /etc/mysql/conf.d/mariadb.conf.d/50-mysqld_safe.cnf -# Enable this if you want to have error logging into a separate file -#log_error = /var/log/mysql/error.log -# Enable the slow query log to see queries with especially long duration -#slow_query_log_file = /var/log/mysql/mariadb-slow.log -#long_query_time = 10 -#log_slow_verbosity = query_plan,explain -#log-queries-not-using-indexes -#min_examined_row_limit = 1000 - -# The following can be used as easy to replay backup logs or for replication. -# note: if you are setting up a replication slave, see README.Debian about -# other settings you may need to change. -#server-id = 1 -#log_bin = /var/log/mysql/mysql-bin.log -expire_logs_days = 10 -#max_binlog_size = 100M - -# -# * SSL/TLS -# - -# For documentation, please read -# https://mariadb.com/kb/en/securing-connections-for-client-and-server/ -#ssl-ca = /etc/mysql/cacert.pem -#ssl-cert = /etc/mysql/server-cert.pem -#ssl-key = /etc/mysql/server-key.pem -#require-secure-transport = on - -# -# * Character sets -# - -# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full -# utf8 4-byte character set. See also client.cnf -character-set-server = utf8mb4 -collation-server = utf8mb4_general_ci - -# -# * InnoDB -# - -# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. -# Read the manual for more InnoDB related options. There are many! -# Most important is to give InnoDB 80 % of the system RAM for buffer use: -# https://mariadb.com/kb/en/innodb-system-variables/#innodb_buffer_pool_size -#innodb_buffer_pool_size = 8G - -# this is only for embedded server -[embedded] - -# This group is only read by MariaDB servers, not by MySQL. -# If you use the same .cnf file for MySQL and MariaDB, -# you can put MariaDB-only options here -[mariadb] - -# This group is only read by MariaDB-{{ mariadb_server_ver.stdout }} servers. -# If you use the same .cnf file for MariaDB of different versions, -# use this group for options that older servers don't understand -[mariadb-{{ mariadb_server_ver.stdout }}] \ No newline at end of file diff --git a/roles/mariaDB_install/tests/inventory b/roles/mariaDB_install/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/mariaDB_install/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/mariaDB_install/tests/test.yml b/roles/mariaDB_install/tests/test.yml deleted file mode 100644 index 72545df..0000000 --- a/roles/mariaDB_install/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - mariaDB_install diff --git a/roles/mariaDB_install/vars/main.yml b/roles/mariaDB_install/vars/main.yml deleted file mode 100644 index 05cbbbc..0000000 --- a/roles/mariaDB_install/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for mariaDB_install diff --git a/roles/nfs_install/.travis.yml b/roles/nfs_install/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/nfs_install/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/nfs_install/README.md b/roles/nfs_install/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/nfs_install/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/nfs_install/defaults/main.yml b/roles/nfs_install/defaults/main.yml deleted file mode 100644 index 7916894..0000000 --- a/roles/nfs_install/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for nfs-share diff --git a/roles/nfs_install/handlers/main.yml b/roles/nfs_install/handlers/main.yml deleted file mode 100644 index cc21551..0000000 --- a/roles/nfs_install/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for nfs-share diff --git a/roles/nfs_install/meta/main.yml b/roles/nfs_install/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/nfs_install/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/nfs_install/tasks/main.yml b/roles/nfs_install/tasks/main.yml deleted file mode 100644 index 51ba852..0000000 --- a/roles/nfs_install/tasks/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: Nfs install for Debian - become: true - ansible.builtin.package: - name: - - nfs-kernel-server - state: present - when: ansible_os_family == 'Debian' - -- name: Nfs install for RedHat - become: true - ansible.builtin.package: - name: - - nfs-utils - state: present - when: ansible_os_family == 'RedHat' - -- name: Start and enable nfs - ansible.builtin.service: - name: nfs-server - state: started - enabled: yes diff --git a/roles/nfs_install/tests/inventory b/roles/nfs_install/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/nfs_install/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/nfs_install/tests/test.yml b/roles/nfs_install/tests/test.yml deleted file mode 100644 index cc646ad..0000000 --- a/roles/nfs_install/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - nfs-share diff --git a/roles/nfs_install/vars/main.yml b/roles/nfs_install/vars/main.yml deleted file mode 100644 index f5d95c7..0000000 --- a/roles/nfs_install/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for nfs-share diff --git a/roles/proxmox/.travis.yml b/roles/proxmox/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/proxmox/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/proxmox/README.md b/roles/proxmox/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/proxmox/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/proxmox/defaults/main.yml b/roles/proxmox/defaults/main.yml deleted file mode 100644 index 8c3c2ee..0000000 --- a/roles/proxmox/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for proxmox diff --git a/roles/proxmox/handlers/main.yml b/roles/proxmox/handlers/main.yml deleted file mode 100644 index 2d6c512..0000000 --- a/roles/proxmox/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# handlers file for proxmox -- name: iommu-grub-update - ansible.builtin.command: update-grub diff --git a/roles/proxmox/meta/main.yml b/roles/proxmox/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/proxmox/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/proxmox/tasks/iommu.yml b/roles/proxmox/tasks/iommu.yml deleted file mode 100644 index d5c4353..0000000 --- a/roles/proxmox/tasks/iommu.yml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Copy to /etc/default/grub - template: - src: ../templates/grub - dest: /etc/default/grub - owner: root - group: root - mode: '0644' - notify: iommu-grub-update - -- name: Copy to /etc/modules - template: - src: ../templates/modules - dest: /etc/modules - owner: root - group: root - mode: '0644' diff --git a/roles/proxmox/tasks/main.yml b/roles/proxmox/tasks/main.yml deleted file mode 100644 index 892378a..0000000 --- a/roles/proxmox/tasks/main.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- -# tasks file for proxmox -- name: System settings - ansible.builtin.include_tasks: "{{ item }}" - loop: - - set_community_repo.yml - - iommu.yml - #- set_wol.yml - \ No newline at end of file diff --git a/roles/proxmox/tasks/set_community_repo.yml b/roles/proxmox/tasks/set_community_repo.yml deleted file mode 100644 index 5ccfa98..0000000 --- a/roles/proxmox/tasks/set_community_repo.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: setting community repo - ansible.builtin.blockinfile: - state: present - insertafter: EOF - path: /etc/apt/sources.list - mode: '0664' - create: true - block: | - #Block for setting community repo - deb http://download.proxmox.com/debian/ {{ ansible_distribution_release }} pve-no-subscription - -- name: disable comercial one - file: path=/etc/apt/sources.list.d/pve-enterprise.list state=absent - -- name: disable comercial two - file: path=/etc/apt/sources.list.d/ceph.list state=absent - -- name: Update and upgrade apt packages - apt: - upgrade: yes - update_cache: yes - \ No newline at end of file diff --git a/roles/proxmox/tasks/set_wol.yml b/roles/proxmox/tasks/set_wol.yml deleted file mode 100644 index 0d7e97b..0000000 --- a/roles/proxmox/tasks/set_wol.yml +++ /dev/null @@ -1 +0,0 @@ -#no fuctiona for now \ No newline at end of file diff --git a/roles/proxmox/templates/grub b/roles/proxmox/templates/grub deleted file mode 100644 index 97e27fc..0000000 --- a/roles/proxmox/templates/grub +++ /dev/null @@ -1,41 +0,0 @@ -#MODIFIED VIA ANSIBLE - -# If you change this file, run 'update-grub' afterwards to update -# /boot/grub/grub.cfg. -# For full documentation of the options in this file, see: -# info -f grub -n 'Simple configuration' - -GRUB_DEFAULT=0 -GRUB_TIMEOUT=5 -GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` -GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on" -GRUB_CMDLINE_LINUX="" - -# If your computer has multiple operating systems installed, then you -# probably want to run os-prober. However, if your computer is a host -# for guest OSes installed via LVM or raw disk devices, running -# os-prober can cause damage to those guest OSes as it mounts -# filesystems to look for things. -#GRUB_DISABLE_OS_PROBER=false - -# Uncomment to enable BadRAM filtering, modify to suit your needs -# This works with Linux (no patch required) and with any kernel that obtains -# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) -#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" - -# Uncomment to disable graphical terminal -#GRUB_TERMINAL=console - -# The resolution used on graphical terminal -# note that you can use only modes which your graphic card supports via VBE -# you can see them in real GRUB with the command `vbeinfo' -#GRUB_GFXMODE=640x480 - -# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux -#GRUB_DISABLE_LINUX_UUID=true - -# Uncomment to disable generation of recovery mode menu entries -#GRUB_DISABLE_RECOVERY="true" - -# Uncomment to get a beep at grub start -#GRUB_INIT_TUNE="480 440 1" \ No newline at end of file diff --git a/roles/proxmox/templates/modules b/roles/proxmox/templates/modules deleted file mode 100644 index cf73e46..0000000 --- a/roles/proxmox/templates/modules +++ /dev/null @@ -1,12 +0,0 @@ -#MODIFIED VIA ANSIBLE - -# /etc/modules: kernel modules to load at boot time. -# -# This file contains the names of kernel modules that should be loaded -# at boot time, one per line. Lines beginning with "#" are ignored. -# Parameters can be specified after the module name. - -vfio -vfio_iommu_type1 -vfio_pci -vfio_virqfd diff --git a/roles/proxmox/tests/inventory b/roles/proxmox/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/proxmox/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/proxmox/tests/test.yml b/roles/proxmox/tests/test.yml deleted file mode 100644 index 0e5ad9f..0000000 --- a/roles/proxmox/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - proxmox diff --git a/roles/proxmox/vars/main.yml b/roles/proxmox/vars/main.yml deleted file mode 100644 index e9d9e85..0000000 --- a/roles/proxmox/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for proxmox diff --git a/roles/samba_install/.travis.yml b/roles/samba_install/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/samba_install/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/samba_install/README.md b/roles/samba_install/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/samba_install/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/samba_install/defaults/main.yml b/roles/samba_install/defaults/main.yml deleted file mode 100644 index 055a76d..0000000 --- a/roles/samba_install/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for samba_install diff --git a/roles/samba_install/handlers/main.yml b/roles/samba_install/handlers/main.yml deleted file mode 100644 index 1938dfa..0000000 --- a/roles/samba_install/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# handlers file for samba_install -- name: smb restart - service: - name: smb - state: restarted \ No newline at end of file diff --git a/roles/samba_install/meta/main.yml b/roles/samba_install/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/samba_install/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/samba_install/tasks/main.yml b/roles/samba_install/tasks/main.yml deleted file mode 100644 index 943f3cf..0000000 --- a/roles/samba_install/tasks/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -# tasks file for samba_install -- name: Install - ansible.builtin.package: - name: - - samba - state: present - -- name: Start and enabled - ansible.builtin.service: - name: smbd - state: started - enabled: true - -- name: Copy config - template: - src: ../templates/smb.conf - dest: /etc/samba/smb.conf - owner: root - group: root - mode: '0644' - notify: smb restart diff --git a/roles/samba_install/templates/smb.conf b/roles/samba_install/templates/smb.conf deleted file mode 100644 index 21f7027..0000000 --- a/roles/samba_install/templates/smb.conf +++ /dev/null @@ -1,54 +0,0 @@ -[global] - workgroup = DOMA2 - interfaces = "{{ samba_ip }}" - bind interfaces only = yes - log file = /var/log/samba/log.%m - max log size = 1000 - logging = file - panic action = /usr/share/samba/panic-action %d - server role = standalone server - obey pam restrictions = yes - unix password sync = yes - passwd program = /usr/bin/passwd %u - passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . - pam password change = yes - map to guest = bad user -; logon path = \\%N\profiles\%U -; logon drive = H: -; logon script = logon.cmd -; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u -; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u -; add group script = /usr/sbin/addgroup --force-badname %g -; include = /home/samba/etc/smb.conf.%m -; idmap config * : backend = tdb -; idmap config * : range = 3000-7999 -; idmap config YOURDOMAINHERE : backend = tdb -; idmap config YOURDOMAINHERE : range = 100000-999999 -; template shell = /bin/bash -;[netlogon] -; comment = Network Logon Service -; path = /home/samba/netlogon -; guest ok = yes -; read only = yes -;[profiles] -; comment = Users profiles -; path = /home/samba/profiles -; guest ok = no -; browseable = no -; create mask = 0600 -; directory mask = 0700 -;[printers] -; comment = All Printers -; browseable = no -; path = /var/spool/samba -; printable = yes -; guest ok = no -; read only = yes -; create mask = 0700 -;[print$] -; comment = Printer Drivers -; path = /var/lib/samba/printers -; browseable = yes -; read only = yes -; guest ok = no -; write list = root, @lpadmin \ No newline at end of file diff --git a/roles/samba_install/tests/inventory b/roles/samba_install/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/samba_install/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/samba_install/tests/test.yml b/roles/samba_install/tests/test.yml deleted file mode 100644 index fc58879..0000000 --- a/roles/samba_install/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - samba_install diff --git a/roles/samba_install/vars/main.yml b/roles/samba_install/vars/main.yml deleted file mode 100644 index a92b740..0000000 --- a/roles/samba_install/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for samba_install diff --git a/roles/tools_for_command_line/.travis.yml b/roles/tools_for_command_line/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/tools_for_command_line/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/tools_for_command_line/defaults/main.yml b/roles/tools_for_command_line/defaults/main.yml deleted file mode 100644 index ec8b018..0000000 --- a/roles/tools_for_command_line/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for tools_for_command_line diff --git a/roles/tools_for_command_line/handlers/main.yml b/roles/tools_for_command_line/handlers/main.yml deleted file mode 100644 index c8669c6..0000000 --- a/roles/tools_for_command_line/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for tools_for_command_line diff --git a/roles/tools_for_command_line/tasks/administration.yml b/roles/tools_for_command_line/tasks/administration.yml deleted file mode 100644 index dfe97d7..0000000 --- a/roles/tools_for_command_line/tasks/administration.yml +++ /dev/null @@ -1,40 +0,0 @@ ---- -- name: Administration - become: true - ansible.builtin.package: - name: - - htop - - mc - - nano - - net-tools - - ncdu - - nmap - - telnet - - gpg - - openssh-server - - neofetch - - sudo - - powertop - - rsync - - iotop - - screen - - python3 - - python3-pip - - mycli - state: present - -- name: Wireguard deb - become: true - ansible.builtin.package: - name: - - wireguard - state: present - when: ansible_os_family == 'Debian' - -- name: Wireguard other - become: true - ansible.builtin.package: - name: - - wireguard-tools - state: present - when: ansible_os_family != 'Debian' diff --git a/roles/tools_for_command_line/tasks/main.yml b/roles/tools_for_command_line/tasks/main.yml deleted file mode 100644 index b5c023f..0000000 --- a/roles/tools_for_command_line/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# tasks file for tools_for_command_line -- name: Critical system - ansible.builtin.include_tasks: - administration.yml diff --git a/roles/tools_for_command_line/tests/inventory b/roles/tools_for_command_line/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/tools_for_command_line/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/tools_for_command_line/tests/test.yml b/roles/tools_for_command_line/tests/test.yml deleted file mode 100644 index fbdd450..0000000 --- a/roles/tools_for_command_line/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - tools_for_command_line diff --git a/roles/tools_for_command_line/vars/main.yml b/roles/tools_for_command_line/vars/main.yml deleted file mode 100644 index 5f92726..0000000 --- a/roles/tools_for_command_line/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for tools_for_command_line diff --git a/roles/wireguard-server/.travis.yml b/roles/wireguard-server/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/wireguard-server/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/wireguard-server/README.md b/roles/wireguard-server/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/wireguard-server/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/wireguard-server/defaults/main.yml b/roles/wireguard-server/defaults/main.yml deleted file mode 100644 index 35fc79f..0000000 --- a/roles/wireguard-server/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for wireguard-server diff --git a/roles/wireguard-server/handlers/main.yml b/roles/wireguard-server/handlers/main.yml deleted file mode 100644 index 2a68778..0000000 --- a/roles/wireguard-server/handlers/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -# handlers file for wireguard-server -- name: wireguard-server restart - ansible.builtin.service: - name: wg-quick@wireguardserver - state: restarted diff --git a/roles/wireguard-server/meta/main.yml b/roles/wireguard-server/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/wireguard-server/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/wireguard-server/tasks/main.yml b/roles/wireguard-server/tasks/main.yml deleted file mode 100644 index 56338fa..0000000 --- a/roles/wireguard-server/tasks/main.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- name: Copy config - template: - src: ../templates/wireguardserver.conf - dest: /etc/wireguard/wireguardserver.conf - owner: root - group: root - mode: '0644' - notify: wireguard-server restart - -- name: Start and enabled - ansible.builtin.service: - name: wg-quick@wireguardserver - state: started - enabled: true \ No newline at end of file diff --git a/roles/wireguard-server/templates/wireguardclient.conf b/roles/wireguard-server/templates/wireguardclient.conf deleted file mode 100644 index 3b5fd74..0000000 --- a/roles/wireguard-server/templates/wireguardclient.conf +++ /dev/null @@ -1,13 +0,0 @@ -[Interface] -Address = {{ IP }}/24 -DNS = 192.168.5.5 -#PostUP = wifi-wireguard -e -#PostDOWN = wifi-wireguard -d -SaveConfig = false -ListenPort = 40041 -PrivateKey = {{ priv }} - -[Peer] -PublicKey = {{ wireguard_server_pub }} -AllowedIPs = 10.0.0.0/24, 192.168.5.0/24, 192.168.6.0/24 -Endpoint = 185.61.86.153:51820 diff --git a/roles/wireguard-server/templates/wireguardserver.conf b/roles/wireguard-server/templates/wireguardserver.conf deleted file mode 100644 index 776418b..0000000 --- a/roles/wireguard-server/templates/wireguardserver.conf +++ /dev/null @@ -1,18 +0,0 @@ -[Interface] -PrivateKey = {{ wireguard_server_key }} -Address=10.0.0.1/24 -PostUp=iptables -A FORWARD -i wireguardserver -o ens18 -j ACCEPT; iptables -A FORWARD -i ens18 -o wireguardserver -j ACCEPT; iptables -t nat -A POSTROUTING -o ens18 -j MASQUERADE; -PostDown=iptables -D FORWARD -i wireguardserver -o ens18 -j ACCEPT; iptables -D FORWARD -i ens18 -o wireguardserver -j ACCEPT; iptables -t nat -D POSTROUTING -o ens18 -j MASQUERADE; -ListenPort=51820 - -[Peer] -PublicKey = {{ wireguard_ntb_pub }} -AllowedIPs = 10.0.0.2/32 - -[Peer] -PublicKey = {{ wireguard_kate_pub }} -AllowedIPs = 10.0.0.3/32 - -[Peer] -PublicKey = {{ wireguard_tata_pub }} -AllowedIPs = 10.0.0.4/32 \ No newline at end of file diff --git a/roles/wireguard-server/tests/inventory b/roles/wireguard-server/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/wireguard-server/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/wireguard-server/tests/test.yml b/roles/wireguard-server/tests/test.yml deleted file mode 100644 index f27f534..0000000 --- a/roles/wireguard-server/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - wireguard-server diff --git a/roles/wireguard-server/vars/main.yml b/roles/wireguard-server/vars/main.yml deleted file mode 100644 index 00259a3..0000000 --- a/roles/wireguard-server/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for wireguard-server diff --git a/roles/zfs_install/.travis.yml b/roles/zfs_install/.travis.yml deleted file mode 100644 index 36bbf62..0000000 --- a/roles/zfs_install/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: python -python: "2.7" - -# Use the new container infrastructure -sudo: false - -# Install ansible -addons: - apt: - packages: - - python-pip - -install: - # Install ansible - - pip install ansible - - # Check ansible version - - ansible --version - - # Create ansible.cfg with correct roles_path - - printf '[defaults]\nroles_path=../' >ansible.cfg - -script: - # Basic role syntax check - - ansible-playbook tests/test.yml -i tests/inventory --syntax-check - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ \ No newline at end of file diff --git a/roles/zfs_install/README.md b/roles/zfs_install/README.md deleted file mode 100644 index 225dd44..0000000 --- a/roles/zfs_install/README.md +++ /dev/null @@ -1,38 +0,0 @@ -Role Name -========= - -A brief description of the role goes here. - -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. - -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 } - -License -------- - -BSD - -Author Information ------------------- - -An optional section for the role authors to include contact information, or a website (HTML is not allowed). diff --git a/roles/zfs_install/defaults/main.yml b/roles/zfs_install/defaults/main.yml deleted file mode 100644 index 803c95e..0000000 --- a/roles/zfs_install/defaults/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# defaults file for zfs-install diff --git a/roles/zfs_install/handlers/main.yml b/roles/zfs_install/handlers/main.yml deleted file mode 100644 index e6be0c9..0000000 --- a/roles/zfs_install/handlers/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# handlers file for zfs-install diff --git a/roles/zfs_install/meta/main.yml b/roles/zfs_install/meta/main.yml deleted file mode 100644 index c572acc..0000000 --- a/roles/zfs_install/meta/main.yml +++ /dev/null @@ -1,52 +0,0 @@ -galaxy_info: - author: your name - description: your role description - company: your company (optional) - - # If the issue tracker for your role is not on github, uncomment the - # next line and provide a value - # issue_tracker_url: http://example.com/issue/tracker - - # Choose a valid license ID from https://spdx.org - some suggested licenses: - # - BSD-3-Clause (default) - # - MIT - # - GPL-2.0-or-later - # - GPL-3.0-only - # - Apache-2.0 - # - CC-BY-4.0 - license: license (GPL-2.0-or-later, MIT, etc) - - min_ansible_version: 2.1 - - # If this a Container Enabled role, provide the minimum Ansible Container version. - # min_ansible_container_version: - - # - # Provide a list of supported platforms, and for each platform a list of versions. - # If you don't wish to enumerate all versions for a particular platform, use 'all'. - # To view available platforms and versions (or releases), visit: - # https://galaxy.ansible.com/api/v1/platforms/ - # - # platforms: - # - name: Fedora - # versions: - # - all - # - 25 - # - name: SomePlatform - # versions: - # - all - # - 1.0 - # - 7 - # - 99.99 - - galaxy_tags: [] - # List tags for your role here, one per line. A tag is a keyword that describes - # and categorizes the role. Users find roles by searching for tags. Be sure to - # remove the '[]' above, if you add tags to this list. - # - # NOTE: A tag is limited to a single word comprised of alphanumeric characters. - # Maximum 20 tags per role. - -dependencies: [] - # List your role dependencies here, one per line. Be sure to remove the '[]' above, - # if you add dependencies to this list. diff --git a/roles/zfs_install/tasks/main.yml b/roles/zfs_install/tasks/main.yml deleted file mode 100644 index bca02f9..0000000 --- a/roles/zfs_install/tasks/main.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -# tasks file for zfs-install -- name: Set on Contrib for Debian - apt_repository: - repo: deb http://deb.debian.org/debian {{ ansible_distribution_release }} contrib - state: present - filename: contrib - update_cache: true - when: ansible_os_family == "Debian" - -- name: Zfs isntall - become: true - ansible.builtin.package: - name: - - zfsutils-linux - - linux-headers-amd64 - - zfs-dkms - - zfs-zed - state: present - -- name: Add the zfs module - community.general.modprobe: - name: zfs diff --git a/roles/zfs_install/tests/inventory b/roles/zfs_install/tests/inventory deleted file mode 100644 index 878877b..0000000 --- a/roles/zfs_install/tests/inventory +++ /dev/null @@ -1,2 +0,0 @@ -localhost - diff --git a/roles/zfs_install/tests/test.yml b/roles/zfs_install/tests/test.yml deleted file mode 100644 index b2999dd..0000000 --- a/roles/zfs_install/tests/test.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: localhost - remote_user: root - roles: - - zfs-install diff --git a/roles/zfs_install/vars/main.yml b/roles/zfs_install/vars/main.yml deleted file mode 100644 index 8fc86d8..0000000 --- a/roles/zfs_install/vars/main.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -# vars file for zfs-install diff --git a/zeus-vars.yml b/zeus-vars.yml index 9ccc98a..1a8d2ec 100644 --- a/zeus-vars.yml +++ b/zeus-vars.yml @@ -2,6 +2,7 @@ zfs_pool_name: bigpool ip: 192.168.5.7 ip_admin: 192.168.6.7 mysql_host: "{{ ip_admin }}" +gateway: 192.168.6.1 wireguard_ntb_ip: 10.0.0.2 wireguard_tata_ip: 10.0.0.4 diff --git a/zeus.yml b/zeus.yml index b048390..25ebcfc 100644 --- a/zeus.yml +++ b/zeus.yml @@ -1,5 +1,5 @@ #- name: Init for zeus -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - zeus-vars.yml @@ -25,8 +25,76 @@ # - role: ansible-role-docker +- name: Pictures + hosts: zeus-local + become: true + vars_files: + - vault.yml + - zeus-vars.yml + vars: + user: warezjoe + zfs_dataset_name: Pictures + zfs_dataset_user: "{{ user }}" + zfs_dataset_group: "{{ user }}" + zfs_dataset_size: 200G + + roles: + - role: create_zfs_dataset + + +#- name: Music +# hosts: zeus-local +# become: true +# vars_files: +# - vault.yml +# - zeus-vars.yml +# vars: +# user: warezjoe +# zfs_dataset_name: Music +# zfs_dataset_user: "{{ user }}" +# zfs_dataset_group: "{{ user }}" +# zfs_dataset_size: 200G +# +# roles: +# - role: create_zfs_dataset + + +#- name: Searials +# hosts: zeus-local +# become: true +# vars_files: +# - vault.yml +# - zeus-vars.yml +# vars: +# user: warezjoe +# zfs_dataset_name: Searials +# zfs_dataset_user: "{{ user }}" +# zfs_dataset_group: "{{ user }}" +# zfs_dataset_size: 1T +# +# roles: +# - role: create_zfs_dataset + +#- name: Films +# hosts: zeus-local +# become: true +# vars_files: +# - vault.yml +# - zeus-vars.yml +# vars: +# user: warezjoe +# zfs_dataset_name: Films +# zfs_dataset_user: "{{ user }}" +# zfs_dataset_group: "{{ user }}" +# zfs_dataset_size: 1T +# +# roles: +# - role: create_zfs_dataset + + + #- name: Zfs dataset + Samba - Tata -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -50,11 +118,13 @@ # - role: create_user # - role: create_zfs_dataset # - role: create_samba_user - # smbpasswd -a tata + # smbpasswd -a tata + + #- name: MariaDB start -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - zeus-vars.yml @@ -77,7 +147,7 @@ # - role: mariaDB_install #- name: nginx -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - zeus-vars.yml @@ -94,12 +164,13 @@ #- name: email -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - zeus-vars.yml # vars: -# zfs_dataset_name: email +# docker_name: email +# zfs_dataset_name: "{{ docker_name }}" # zfs_dataset_user: root # zfs_dataset_group: root # zfs_dataset_size: 1G @@ -113,7 +184,7 @@ #- name: Torrent client spawn -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -134,7 +205,7 @@ # - role: docker_spin_up #- name: Pi-hole -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -152,7 +223,7 @@ # - role: docker_spin_up #- name: nextcloud -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -169,7 +240,7 @@ # - role: docker_spin_up #- name: gitea -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -186,7 +257,7 @@ # - role: docker_spin_up #- name: dashboard-my-public -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -203,7 +274,7 @@ # - role: docker_spin_up #- name: wireguard-server -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -212,7 +283,7 @@ # - role: wireguard-server #- name: monitoring -# hosts: zeus-public +# hosts: zeus-local # become: true # vars_files: # - vault.yml @@ -235,23 +306,23 @@ # - role: create_zfs_dataset # - role: docker_spin_up -- name: jellyfin - hosts: zeus-public - become: true - vars_files: - - vault.yml - - zeus-vars.yml - vars: - docker_name: jellyfin - user: warezjoe - primary_group: "{{ user }}" - uid: 1000 - gid: "{{ uid }}" - docker_compose_file: "{{ docker_name }}.yml" - zfs_dataset_name: "{{ docker_name }}" - zfs_dataset_user: "{{ user }}" - zfs_dataset_group: "{{ primary_group }}" - zfs_dataset_size: 50M - roles: - - role: create_zfs_dataset - - role: docker_spin_up \ No newline at end of file +#- name: jellyfin +# hosts: zeus-local +# become: true +# vars_files: +# - vault.yml +# - zeus-vars.yml +# vars: +# docker_name: jellyfin +# user: warezjoe +# primary_group: "{{ user }}" +# uid: 1000 +# gid: "{{ uid }}" +# docker_compose_file: "{{ docker_name }}.yml" +# zfs_dataset_name: "{{ docker_name }}" +# zfs_dataset_user: "{{ user }}" +# zfs_dataset_group: "{{ primary_group }}" +# zfs_dataset_size: 200M +# roles: +# - role: create_zfs_dataset +# - role: docker_spin_up \ No newline at end of file