From 0260125e6638c1264fd1bdad4df1e54d076866aa Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Oct 2024 11:53:46 +0200 Subject: [PATCH 1/6] refs #8025 README run playbook fix --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 70d4e54..580a348 100644 --- a/README.md +++ b/README.md @@ -41,8 +41,8 @@ ansible-galaxy collection install -r collections/requirements.yml ## Run playbook Before merging changes into protected branches, playbooks should be tested -locally to ensure they work properly. The *local* inventory can also be used, -wich is not uploaded to the repository. +locally to ensure they work properly. The *inventories/local* inventory can +also be used, wich is not uploaded to the repository. Run playbook on inventory host. ``` From 69d8ff371ab361745955fbbb9be54a4bb2be36b5 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Oct 2024 11:55:12 +0200 Subject: [PATCH 2/6] refs #8025 run-playbook.sh vault-pass fix --- run-playbook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run-playbook.sh b/run-playbook.sh index b6bdeb2..23f5d6a 100755 --- a/run-playbook.sh +++ b/run-playbook.sh @@ -5,8 +5,8 @@ EXTRA_ARGS=() if [ -f .passbolt.yml ]; then EXTRA_ARGS+=("--extra-vars" "@.passbolt.yml") fi -if [ -f .vaultpass ]; then - EXTRA_ARGS+=("--vault-password-file" ".vaultpass") +if [ -f .vault-pass ]; then + EXTRA_ARGS+=("--vault-password-file" ".vault-pass") fi #export PYTHONPATH=./venv/lib/python3.12/site-packages/ From 557a4a090595775621a52582d83b5b7ce93c868b Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Oct 2024 12:00:30 +0200 Subject: [PATCH 3/6] refs #8025 README setup fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 580a348..c36f8c3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,6 @@ Create a Python virtual environment. python3 -m venv venv source venv/bin/activate pip install --upgrade pip ansible==10.1.0 ansible-builder==3.1.0 -pip install -r requirements.txt ``` Before running any Ansible command, activate the Python virtual environment. @@ -35,6 +34,7 @@ deactivate Install dependencies. ``` +pip install -r requirements.txt ansible-galaxy collection install -r collections/requirements.yml ``` From 7235b8ab3784c2926f9f37a240dff5df20f79512 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Oct 2024 12:01:39 +0200 Subject: [PATCH 4/6] refs #8025 README setup fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c36f8c3..1bd3332 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ source venv/bin/activate pip install --upgrade pip ansible==10.1.0 ansible-builder==3.1.0 ``` -Before running any Ansible command, activate the Python virtual environment. +Before running any Python dependent command, activate the virtual environment. ``` source venv/bin/activate ``` From 09ed8be828867d2dbe1cbbccc82256cc9d06668a Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 8 Oct 2024 12:07:51 +0200 Subject: [PATCH 5/6] refs #8025 README run fix --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1bd3332..821cd29 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Before running any Python dependent command, activate the virtual environment. source venv/bin/activate ``` -Once you're done, deactivate the virtual environment. +Once you are done, deactivate the virtual environment. ``` deactivate ``` @@ -41,8 +41,8 @@ ansible-galaxy collection install -r collections/requirements.yml ## Run playbook Before merging changes into protected branches, playbooks should be tested -locally to ensure they work properly. The *inventories/local* inventory can -also be used, wich is not uploaded to the repository. +locally to ensure they work properly. The *inventories/local* inventory is not +uploaded to the repository and can be used for local testing. Run playbook on inventory host. ``` From 070c526ce2548db4f0ede40bf42c8d956187b6a4 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 15 Oct 2024 14:50:12 +0200 Subject: [PATCH 6/6] refs #8025 Inventories removed, license added --- LICENSE | 17 +++++++ README.md | 3 +- inventories/core | 31 ------------- inventories/group_vars/all.yml | 30 ++++++------- inventories/lab | 38 ---------------- inventories/servers | 81 ---------------------------------- inventories/template | 20 +++++++++ 7 files changed, 54 insertions(+), 166 deletions(-) create mode 100644 LICENSE delete mode 100644 inventories/core delete mode 100644 inventories/lab delete mode 100644 inventories/servers create mode 100644 inventories/template diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5e558e2 --- /dev/null +++ b/LICENSE @@ -0,0 +1,17 @@ +Copyright (C) 2020 - Verdnatura Levante S.L. + +This package is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +On Debian systems, the complete text of the GNU General Public +License can be found in "/usr/share/common-licenses/GPL-3". diff --git a/README.md b/README.md index 821cd29..e90fcfa 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,8 @@ ansible-galaxy collection install -r collections/requirements.yml Before merging changes into protected branches, playbooks should be tested locally to ensure they work properly. The *inventories/local* inventory is not -uploaded to the repository and can be used for local testing. +uploaded to the repository and can be used for local testing. In any case, it +is advisable to use a different repository to store inventories. Run playbook on inventory host. ``` diff --git a/inventories/core b/inventories/core deleted file mode 100644 index 070b7f6..0000000 --- a/inventories/core +++ /dev/null @@ -1,31 +0,0 @@ -[all:vars] -host_domain=core.dc.verdnatura.es - -[backup:vars] -host_domain=backup.dc.verdnatura.es - -[ceph] -ceph[1:3] - -[ceph_gw] -ceph-gw[1:2] - -[pve] -pve[01:05] - -[infra:children] -ceph -ceph_gw -pve - -[core] -core-agent -core-proxy - -[backup] -bacula-dir -bacula-db -bacularis -backup-nas -tftp -kube-backup diff --git a/inventories/group_vars/all.yml b/inventories/group_vars/all.yml index f98b825..5a3dad5 100644 --- a/inventories/group_vars/all.yml +++ b/inventories/group_vars/all.yml @@ -2,23 +2,23 @@ hostname_fqdn: "{{inventory_hostname_short}}.{{host_domain}}" ansible_host: "{{hostname_fqdn}}" passbolt: 'anatomicjc.passbolt.passbolt' passbolt_inventory: 'anatomicjc.passbolt.passbolt_inventory' -sysadmin_mail: sysadmin@verdnatura.es +sysadmin_mail: sysadmin@domain.local sysadmin_group: sysadmin -smtp_server: smtp.verdnatura.es -homes_server: homes.servers.dc.verdnatura.es -nagios_server: nagios.verdnatura.es -time_server: time1.verdnatura.es time2.verdnatura.es -main_dns_server: ns1.verdnatura.es -ldap_uri: ldap://ldap.verdnatura.es -ldap_base: dc=verdnatura,dc=es +smtp_server: smtp.domain.local +homes_server: homes.domain.local +nagios_server: nagios.domain.local +time_server: time1.domain.local time2.domain.local +main_dns_server: ns1.domain.local +ldap_uri: ldap://ldap.domain.local +ldap_base: dc=domain,dc=local dc_net: "10.0.0.0/16" -resolv_domain: verdnatura.es +resolv_domain: domain.local resolvers: - - '10.0.0.4' - - '10.0.0.5' -awx_email: awx@verdnatura.es + - '8.8.8.8' + - '8.8.4.4' +awx_email: awx@domain.local awx_pub_key: > ssh-ed25519 - AAAAC3NzaC1lZDI1NTE5AAAAIKzAwWm+IsqZCgMzjdZ7Do3xWtVtoUCpWJpH7KSi2a/H - awx@verdnatura.es -passbolt_folder: e0d517be-6783-4b97-9742-acaa9b09742f + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + awx@domain.local +passbolt_folder: 00000000-0000-0000-0000-000000000000 diff --git a/inventories/lab b/inventories/lab deleted file mode 100644 index 1bcf480..0000000 --- a/inventories/lab +++ /dev/null @@ -1,38 +0,0 @@ -[all:vars] -host_domain=lab.verdnatura.es - -[cephlab] -cephlab[01:03] - -[pvelab] -pvelab[01:03] - -[infra:children] -cephlab -pvelab - -[cephtest] -cephtest[01:03] - -[kubepre] -kubepre-helm -kubepre-proxy1 -kubepre-master[1:3] -kubepre-worker[1:4] - -[kubetest] -kubetest-helm -kubetest-master[01:03] -kubetest-worker[01:04] - -[laboratory] -ansible-test -corelab-proxy1 -zammad -matrix - -[guest:children] -cephtest -kubepre -kubetest -laboratory diff --git a/inventories/servers b/inventories/servers deleted file mode 100644 index c8fe2ad..0000000 --- a/inventories/servers +++ /dev/null @@ -1,81 +0,0 @@ -[all:vars] -host_domain=servers.dc.verdnatura.es - -[kube_master] -kube-master[1:5] - -[kube_worker] -kube-worker[1:5] - -[kube_proxy] -kube-proxy[1:2] - -[kube_helper] -kube-helm - -[kubernetes:children] -kube_master -kube_worker -kube_proxy -kube_helper - -[ad] -dc[1:2] -server - -[db] -db-proxy[1:2] -db[1:2] - -[ldap] -ldap-proxy[1:2] -ldap[1:3] - -[mail] -dovecot -mailgw[1:2] -postfix -spamd -spamd-db - -[monitoring] -cacti -logger -nagios -nagiosql-db -librenms - -[network] -dhcp[1:2] -ns[1:2] -unifi -vpn -time[1:2] - -[princ] -pbx -homes -doku -iventoy - -[rds] -ts-proxy[1:2] -profiles - -[test] -test-db1 -test-db-proxy[1:2] -monthly-db -dev-db - -[guest:children] -ad -db -kubernetes -ldap -mail -monitoring -network -princ -rds -test diff --git a/inventories/template b/inventories/template new file mode 100644 index 0000000..a1680ce --- /dev/null +++ b/inventories/template @@ -0,0 +1,20 @@ +[all:vars] +host_domain=domain.local + +[pve:vars] +host_domain=core.domain.local + +[ceph] +ceph[1:3] + +[pve] +pve[1:5] + +[infra:children] +ceph +pve + +[servers] +server1 ansible_host=10.0.0.1 +server1 ansible_host=10.0.0.2 +server3 ansible_host=10.0.0.3