docker and docker-compose added
This commit is contained in:
parent
9df9e6c1ee
commit
fb5f9c25dd
@ -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'
|
||||
@ -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
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user