Compare commits
No commits in common. "9dba002f10cbf5d6a0c3bcc5ae196ed1b9bff4ee" and "07511ef72358f7ba67ef8b3c046a035d3746de1e" have entirely different histories.
9dba002f10
...
07511ef723
10 changed files with 42 additions and 39 deletions
|
@ -1,28 +1,30 @@
|
||||||
- name: Ensure NGINX repo setup and nginx install on relevant hosts
|
- name: Ensure NGINX repo and install on nginx_hosts
|
||||||
hosts: nginx_hosts:nextcloud_hosts
|
hosts: nginx_hosts
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure NGINX repo is setup
|
- name: make sure NGINX repos are setup
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: nginx
|
||||||
tasks_from: main/02_repo_setup.yaml
|
tasks_from: main/repo_setup
|
||||||
|
|
||||||
- name: Ensure nginx is installed
|
- name: make sure NGINX is installed
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: nginx
|
||||||
tasks_from: main/03_nginx_install.yaml
|
tasks_from: main/nginx_install
|
||||||
|
|
||||||
- name: Ensure Docker repo setup and package install on relevant hosts
|
- name: Ensure NGINX repo and install on nextcloud_hosts
|
||||||
hosts: docker_compose_hosts:nextcloud_hosts
|
hosts: nextcloud_hosts:!nginx_hosts
|
||||||
tasks:
|
tasks:
|
||||||
- name: Ensure Docker repo is setup
|
- name: make sure NGINX repos are setup
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: docker
|
name: nginx
|
||||||
tasks_from: main/01_repo_setup.yaml
|
tasks_from: main/repo_setup
|
||||||
|
|
||||||
- name: Ensure Docker Engine and other related packages are installed
|
- name: make sure NGINX is installed
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: docker
|
name: nginx
|
||||||
tasks_from: main/02_docker_install.yaml
|
tasks_from: main/nginx_install
|
||||||
|
vars:
|
||||||
|
nginx__version_spec: "{{ nextcloud__nginx_version_spec | default('') }}"
|
||||||
|
|
||||||
- name: Make Sure System Package Are Up-To-Date for all non-hypervisors
|
- name: Make Sure System Package Are Up-To-Date for all non-hypervisors
|
||||||
hosts: all:!hypervisors
|
hosts: all:!hypervisors
|
||||||
|
|
|
@ -1,22 +1,26 @@
|
||||||
# Role `docker`
|
# Role `docker`
|
||||||
|
|
||||||
Ensures the Docker Engine and other related packages are installed from the Docker repos.
|
Makes sure Docker Engine and other related packages are installed from the Docker repos on the specified hosts.
|
||||||
For detailed list of packages see: [`tasks/main/02_docker_install.yaml`](./tasks/main/02_docker_install.yaml).
|
For details see: [`tasks/main/02_docker_install.yaml`](./tasks/main/02_docker_install.yaml).
|
||||||
|
|
||||||
## Supported Distributions
|
## Supported Distributions
|
||||||
|
|
||||||
The following distributions are supported:
|
The following distributions are supported:
|
||||||
|
|
||||||
- Debian 11
|
- Debian 11
|
||||||
- Debian 12
|
|
||||||
|
|
||||||
## Required Arguments
|
## Required Arguments
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
|
||||||
## Optional Arguments
|
## Updates
|
||||||
|
|
||||||
None.
|
This role doesn't handle updates.
|
||||||
|
However it uses the system package manager for installing Docker Engine and the other related packages, so when you're making sure the system packages are up-to-date, you're handling updates for the packages installed by this role as well.
|
||||||
|
|
||||||
|
## `hosts`
|
||||||
|
|
||||||
|
The `hosts` for this role need to be the machines for which you want to make sure Docker Engine and other related packages are installed from the Docker repos.
|
||||||
|
|
||||||
## Links & Resources
|
## Links & Resources
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
- name: Ensure Docker repo is setup
|
- name: make sure the Docker repo is setup
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/01_repo_setup.yaml
|
file: main/01_repo_setup.yaml
|
||||||
|
|
||||||
- name: Ensure Docker Engine and other related packages are installed
|
- name: make sure Docker Engine and other related packages are installed
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/02_docker_install.yaml
|
file: main/02_docker_install.yaml
|
||||||
|
|
||||||
- name: Ensure Docker daemon configuration
|
- name: configure the Docker daemon
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/03_docker_config.yaml
|
file: main/03_docker_config.yaml
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Ensure Dockers GPG key is added
|
- name: make sure Dockers GPG key is added
|
||||||
ansible.builtin.get_url:
|
ansible.builtin.get_url:
|
||||||
url: https://download.docker.com/linux/debian/gpg
|
url: https://download.docker.com/linux/debian/gpg
|
||||||
dest: /etc/apt/trusted.gpg.d/docker.asc
|
dest: /etc/apt/trusted.gpg.d/docker.asc
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
group: root
|
group: root
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Ensure Docker APT repository is added
|
- name: make sure Dockers APT repository is added
|
||||||
ansible.builtin.apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/docker.asc] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
|
||||||
filename: docker
|
filename: docker
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
- name: Ensure Docker Engine and other related packages are installed
|
- name: make sure Docker Engine and other related packages are installed
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Ensure the Docker daemon is configured with the following settings:
|
# Configure the Docker daemon with the following settings:
|
||||||
# - log to systemd journal
|
# - log to systemd journal
|
||||||
# https://docs.docker.com/engine/logging/drivers/journald/
|
# https://docs.docker.com/engine/logging/drivers/journald/
|
||||||
- name: Ensure Docker daemon configuration
|
- name: configure Docker daemon
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: daemon.json
|
src: daemon.json
|
||||||
dest: /etc/docker/daemon.json
|
dest: /etc/docker/daemon.json
|
||||||
|
|
|
@ -2,14 +2,10 @@
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/01_validate_config_names.yaml
|
file: main/01_validate_config_names.yaml
|
||||||
|
|
||||||
- name: Ensure NGINX repo is set up
|
|
||||||
ansible.builtin.import_tasks:
|
|
||||||
file: main/02_repo_setup.yaml
|
|
||||||
|
|
||||||
- name: Ensure nginx is installed
|
- name: Ensure nginx is installed
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/03_nginx_install.yaml
|
file: main/02_nginx_install.yaml
|
||||||
|
|
||||||
- name: Ensure configuration deployment
|
- name: Ensure configuration deployment
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/04_config_deploy.yaml
|
file: main/03_config_deploy.yaml
|
||||||
|
|
|
@ -37,3 +37,10 @@
|
||||||
group: root
|
group: root
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Ensure nginx is installed
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name: nginx
|
||||||
|
state: present
|
||||||
|
update_cache: true
|
||||||
|
become: true
|
|
@ -1,6 +0,0 @@
|
||||||
- name: Ensure nginx is installed
|
|
||||||
ansible.builtin.apt:
|
|
||||||
name: nginx
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
become: true
|
|
Loading…
Add table
Add a link
Reference in a new issue