Compare commits
6 commits
07511ef723
...
9dba002f10
Author | SHA1 | Date | |
---|---|---|---|
9dba002f10 |
|||
1ea63a19d3 |
|||
7420ed6010 |
|||
89f3e55eac |
|||
ce812fb006 |
|||
d62c070ccc |
10 changed files with 39 additions and 42 deletions
|
@ -1,30 +1,28 @@
|
||||||
- name: Ensure NGINX repo and install on nginx_hosts
|
- name: Ensure NGINX repo setup and nginx install on relevant hosts
|
||||||
hosts: nginx_hosts
|
hosts: nginx_hosts:nextcloud_hosts
|
||||||
tasks:
|
tasks:
|
||||||
- name: make sure NGINX repos are setup
|
- name: Ensure NGINX repo is setup
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: nginx
|
||||||
tasks_from: main/repo_setup
|
tasks_from: main/02_repo_setup.yaml
|
||||||
|
|
||||||
- name: make sure NGINX is installed
|
- name: Ensure nginx is installed
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: nginx
|
||||||
tasks_from: main/nginx_install
|
tasks_from: main/03_nginx_install.yaml
|
||||||
|
|
||||||
- name: Ensure NGINX repo and install on nextcloud_hosts
|
- name: Ensure Docker repo setup and package install on relevant hosts
|
||||||
hosts: nextcloud_hosts:!nginx_hosts
|
hosts: docker_compose_hosts:nextcloud_hosts
|
||||||
tasks:
|
tasks:
|
||||||
- name: make sure NGINX repos are setup
|
- name: Ensure Docker repo is setup
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: docker
|
||||||
tasks_from: main/repo_setup
|
tasks_from: main/01_repo_setup.yaml
|
||||||
|
|
||||||
- name: make sure NGINX is installed
|
- name: Ensure Docker Engine and other related packages are installed
|
||||||
ansible.builtin.include_role:
|
ansible.builtin.include_role:
|
||||||
name: nginx
|
name: docker
|
||||||
tasks_from: main/nginx_install
|
tasks_from: main/02_docker_install.yaml
|
||||||
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,26 +1,22 @@
|
||||||
# Role `docker`
|
# Role `docker`
|
||||||
|
|
||||||
Makes sure Docker Engine and other related packages are installed from the Docker repos on the specified hosts.
|
Ensures the Docker Engine and other related packages are installed from the Docker repos.
|
||||||
For details see: [`tasks/main/02_docker_install.yaml`](./tasks/main/02_docker_install.yaml).
|
For detailed list of packages 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.
|
||||||
|
|
||||||
## Updates
|
## Optional Arguments
|
||||||
|
|
||||||
This role doesn't handle updates.
|
None.
|
||||||
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: make sure the Docker repo is setup
|
- name: Ensure 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: make sure Docker Engine and other related packages are installed
|
- name: Ensure 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: configure the Docker daemon
|
- name: Ensure Docker daemon configuration
|
||||||
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: make sure Dockers GPG key is added
|
- name: Ensure 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: make sure Dockers APT repository is added
|
- name: Ensure Docker 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: make sure Docker Engine and other related packages are installed
|
- name: Ensure Docker Engine and other related packages are installed
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- docker-ce
|
- docker-ce
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Configure the Docker daemon with the following settings:
|
# Ensure the Docker daemon is configured 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: configure Docker daemon
|
- name: Ensure Docker daemon configuration
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: daemon.json
|
src: daemon.json
|
||||||
dest: /etc/docker/daemon.json
|
dest: /etc/docker/daemon.json
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
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/02_nginx_install.yaml
|
file: main/03_nginx_install.yaml
|
||||||
|
|
||||||
- name: Ensure configuration deployment
|
- name: Ensure configuration deployment
|
||||||
ansible.builtin.import_tasks:
|
ansible.builtin.import_tasks:
|
||||||
file: main/03_config_deploy.yaml
|
file: main/04_config_deploy.yaml
|
||||||
|
|
|
@ -37,10 +37,3 @@
|
||||||
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
|
|
6
roles/nginx/tasks/main/03_nginx_install.yaml
Normal file
6
roles/nginx/tasks/main/03_nginx_install.yaml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
- 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