This commit is contained in:
2024-09-15 06:55:14 +00:00
parent fb5f9c25dd
commit e317c57e99
2 changed files with 57 additions and 2 deletions
+51
View File
@@ -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
+6 -2
View File
@@ -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