[add cosmos]

This commit is contained in:
2024-10-23 21:59:30 +02:00
parent 74f5ed5d03
commit 0ab76982da
3 changed files with 15 additions and 10 deletions

View File

@@ -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

1
hosts
View File

@@ -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

View File

@@ -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