From b7757e4168c28b7cf5938df1605a01677d293f2e Mon Sep 17 00:00:00 2001 From: Adrian Amaglio Date: Tue, 2 May 2023 10:59:13 +0200 Subject: [PATCH] =?UTF-8?q?mise=20=C3=A0=20jours=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- provisioning/roles/deploy_all/files/bin/deployer.sh | 1 + provisioning/roles/jean-cloud-common/tasks/main.yml | 4 +++- services/list_ips.sh | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 services/list_ips.sh diff --git a/provisioning/roles/deploy_all/files/bin/deployer.sh b/provisioning/roles/deploy_all/files/bin/deployer.sh index 5d58577..23ef84e 100755 --- a/provisioning/roles/deploy_all/files/bin/deployer.sh +++ b/provisioning/roles/deploy_all/files/bin/deployer.sh @@ -70,6 +70,7 @@ for dir in /docker/* ; do # Ignore _ prefixed directories [ "${service::1}" == '_' ] && continue + [ ! -d "$dir" ] && continue docker_service="$(echo "$service" | tr '.' '_')" driglibash_section_prefix="[$service] " diff --git a/provisioning/roles/jean-cloud-common/tasks/main.yml b/provisioning/roles/jean-cloud-common/tasks/main.yml index 8f08f4b..53eef40 100644 --- a/provisioning/roles/jean-cloud-common/tasks/main.yml +++ b/provisioning/roles/jean-cloud-common/tasks/main.yml @@ -29,9 +29,11 @@ - name: Install some softwares apt: - name: ['bind9', 'certbot', 'dnsutils', 'git', 'gnupg2', 'htop', 'netcat-openbsd', 'nginx', 'rsync', 'sshfs', 'vim', 'zip'] + name: ['bind9', 'certbot', 'dnsutils', 'git', 'gnupg2', 'htop', 'netcat-openbsd', 'nginx', 'rsync', 'screen', 'sshfs', 'vim', 'wget', 'zip'] state: latest +# TODO disable certbot and certbot.timer services. We are using our own + - name: create needed dirs ansible.builtin.file: path: "{{item}}" diff --git a/services/list_ips.sh b/services/list_ips.sh new file mode 100755 index 0000000..fb432f4 --- /dev/null +++ b/services/list_ips.sh @@ -0,0 +1,2 @@ +#!/bin/bash +grep -ho '172.29.[^.]' . -r | sort -u