diff --git a/installPackages.yml b/installPackages.yml deleted file mode 100644 index caeedd5..0000000 --- a/installPackages.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- hosts: all - become: yes - tasks: - - name: Install curl on Ubuntu servers - package: - name: curl - state: present - when: ansible_facts['os_family'] == 'Debian' - - - name: Install curl on Fedora servers - dnf: - name: curl - state: present - when: ansible_facts['distribution'] == 'Fedora' diff --git a/inventory b/inventory index 3a4990d..35a15c4 100644 --- a/inventory +++ b/inventory @@ -12,7 +12,10 @@ PaperlessNGX ansible_host=192.168.1.177 StirlingPDF ansible_host=192.168.1.176 CodeServer ansible_host=192.168.1.179 Gitea ansible_host=192.168.1.178 - +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 [personal_laptop] fedora ansible_host=192.168.1.175 ansible_user=ilyes diff --git a/update_machines.yml b/updateServers_installDocker.yml similarity index 55% rename from update_machines.yml rename to updateServers_installDocker.yml index 2b76f18..7e29df1 100644 --- a/update_machines.yml +++ b/updateServers_installDocker.yml @@ -1,4 +1,3 @@ ---- - hosts: all become: true tasks: @@ -14,6 +13,45 @@ state: present when: ansible_facts['os_family'] == "Debian" + - name: Install Docker (Debian/Ubuntu) + apt: + name: + - apt-transport-https + - ca-certificates + - curl + - gnupg-agent + - software-properties-common + state: present + when: ansible_facts['os_family'] == "Debian" + + - name: Add Docker GPG key (Debian/Ubuntu) + apt_key: + url: https://download.docker.com/linux/ubuntu/gpg + state: present + when: ansible_facts['os_family'] == "Debian" + + - name: Add Docker repository (Debian/Ubuntu) + apt_repository: + repo: deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable + state: present + when: ansible_facts['os_family'] == "Debian" + + - name: Install Docker (Debian/Ubuntu) + apt: + name: + - docker-ce + - docker-ce-cli + - containerd.io + state: present + when: ansible_facts['os_family'] == "Debian" + + - 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' + when: ansible_facts['os_family'] == "Debian" + - name: See if a reboot is needed for Ubuntu/Debian pct shell: "needs-restarting -r > /dev/null; echo $?" register: needsRestartingDebian @@ -42,6 +80,14 @@ state: present when: ansible_facts['os_family'] == "RedHat" + - name: Install Docker and Docker Compose (Fedora) + dnf: + name: + - docker + - docker-compose + state: present + when: ansible_facts['os_family'] == "RedHat" + - name: See if a reboot is needed (Fedora) shell: "needs-restarting -r > /dev/null; echo $?" register: needsRestartingFedora @@ -57,4 +103,3 @@ reboot: reboot_timeout: 600 when: ansible_facts['os_family'] == "RedHat" and needsRestartingFedora.stdout == "1" -