From 0ab76982da13d8b7b66f476f1402037124b18986 Mon Sep 17 00:00:00 2001 From: staffadmin Date: Wed, 23 Oct 2024 21:59:30 +0200 Subject: [PATCH] [add cosmos] --- hardening.yml | 6 +++++- hosts | 1 + update.yml | 18 +++++++++--------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hardening.yml b/hardening.yml index 161f15d..402a614 100644 --- a/hardening.yml +++ b/hardening.yml @@ -1,4 +1,4 @@ -- hosts: bastion +- hosts: all # vars: become: true gather_facts: true @@ -7,6 +7,10 @@ # to reinstall netbird rm /usr/share/keyrings/netbird-archive-keyring.gpg # become root no password /etc/sudoers.d/20stephane => stephane ALL=(ALL) NOPASSWD: ALL + - apt: + update_cache: yes + become: true + - ansible.builtin.pip: name: netaddr delegate_to: localhost diff --git a/hosts b/hosts index fe91f97..110814a 100644 --- a/hosts +++ b/hosts @@ -1,6 +1,7 @@ [netbird] scaleway ansible_host=163.172.84.28 ansible_user=stephane bastion ansible_host=163.172.70.242 ansible_user=stephane +cosmos ansible_host=163.172.39.162 ansible_user=stephane [tower] scaleway ansible_host=163.172.84.28 ansible_user=stephane diff --git a/update.yml b/update.yml index ecf436d..b0a20d5 100644 --- a/update.yml +++ b/update.yml @@ -20,22 +20,22 @@ - apt: update_cache: yes become: true - when: - - inventory_hostname != 'scaleway' + # when: + # - inventory_hostname != 'scaleway' - apt: upgrade: full become: true - when: - - inventory_hostname != 'scaleway' + # when: + # - inventory_hostname != 'scaleway' - - community.docker.docker_compose_v2: - project_src: /opt/dockerapps/ - pull: always - when: - - inventory_hostname == 'scaleway' + # - community.docker.docker_compose_v2: + # project_src: /opt/dockerapps/ + # pull: always + # when: + # - inventory_hostname == 'scaleway' - shell: "if [ $(ls /var/run/reboot* 2>/dev/null | wc -l) -gt 0 ]; then echo 'reboot_needed'; fi" register: reboot_needed