diff --git a/LXC_updater.yml b/LXC_updater.yml new file mode 100644 index 0000000..a856255 --- /dev/null +++ b/LXC_updater.yml @@ -0,0 +1,51 @@ +- hosts: all + become: true + tasks: + - name: Update package cache and upgrade all packages (Debian/Ubuntu) + apt: + upgrade: full + update_cache: yes + + - name: Install Docker dependencies (Debian/Ubuntu) + apt: + name: + - apt-transport-https + - ca-certificates + - curl + - gnupg-agent + - software-properties-common + state: present + + - name: Add Docker GPG key (Debian/Ubuntu) + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + + - name: Add Docker repository (Debian/Ubuntu) + apt_repository: + repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable + state: present + + - name: Install Docker and related packages (Debian/Ubuntu) + apt: + name: + - docker-ce + - docker-ce-cli + - containerd.io + state: present + + - name: Install Docker Compose (Debian/Ubuntu) + get_url: + url: https://github.com/docker/compose/releases/download/1.29.2/docker-compose-Linux-x86_64 + dest: /usr/local/bin/docker-compose + mode: '0755' + + - name: Check if a reboot is needed + shell: "needs-restarting -r > /dev/null; echo $?" + register: needs_reboot + changed_when: false + + - name: Reboot the server if necessary + reboot: + reboot_timeout: 600 + when: needs_reboot.rc == 1 diff --git a/inventory b/inventory index 35a15c4..2263761 100644 --- a/inventory +++ b/inventory @@ -8,7 +8,7 @@ Dashy ansible_host=192.168.1.241 Vault ansible_host=192.168.1.239 jellyfin ansible_host=192.168.1.240 Authentik ansible_host=192.168.1.242 -PaperlessNGX ansible_host=192.168.1.177 +PaperlessNGX ansible_host=192.168.1.202 StirlingPDF ansible_host=192.168.1.176 CodeServer ansible_host=192.168.1.179 Gitea ansible_host=192.168.1.178 @@ -16,6 +16,10 @@ Radarr ansible_host=192.168.1.185 Sonarr ansible_host=192.168.1.186 Prowlarr ansible_host=192.168.1.187 qBittorrent ansible_host=192.168.1.188 +defGuard ansible_host=192.168.1.203 +guacamole ansible_host=192.168.1.206 +reasume ansible_host=192.168.1.204 + [personal_laptop] -fedora ansible_host=192.168.1.175 ansible_user=ilyes +fedora ansible_host=191.168.1.175 ansible_user=ilyes