Compare commits
6 commits
07511ef723
...
9dba002f10
Author | SHA1 | Date | |
---|---|---|---|
9dba002f10 | |||
1ea63a19d3 | |||
7420ed6010 | |||
89f3e55eac | |||
ce812fb006 | |||
d62c070ccc |
10 changed files with 39 additions and 42 deletions
playbooks
roles
|
@ -1,30 +1,28 @@
|
|||
- name: Ensure NGINX repo and install on nginx_hosts
|
||||
hosts: nginx_hosts
|
||||
- name: Ensure NGINX repo setup and nginx install on relevant hosts
|
||||
hosts: nginx_hosts:nextcloud_hosts
|
||||
tasks:
|
||||
- name: make sure NGINX repos are setup
|
||||
- name: Ensure NGINX repo is setup
|
||||
ansible.builtin.include_role:
|
||||
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:
|
||||
name: nginx
|
||||
tasks_from: main/nginx_install
|
||||
tasks_from: main/03_nginx_install.yaml
|
||||
|
||||
- name: Ensure NGINX repo and install on nextcloud_hosts
|
||||
hosts: nextcloud_hosts:!nginx_hosts
|
||||
- name: Ensure Docker repo setup and package install on relevant hosts
|
||||
hosts: docker_compose_hosts:nextcloud_hosts
|
||||
tasks:
|
||||
- name: make sure NGINX repos are setup
|
||||
- name: Ensure Docker repo is setup
|
||||
ansible.builtin.include_role:
|
||||
name: nginx
|
||||
tasks_from: main/repo_setup
|
||||
name: docker
|
||||
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:
|
||||
name: nginx
|
||||
tasks_from: main/nginx_install
|
||||
vars:
|
||||
nginx__version_spec: "{{ nextcloud__nginx_version_spec | default('') }}"
|
||||
name: docker
|
||||
tasks_from: main/02_docker_install.yaml
|
||||
|
||||
- name: Make Sure System Package Are Up-To-Date for all non-hypervisors
|
||||
hosts: all:!hypervisors
|
||||
|
|
|
@ -1,26 +1,22 @@
|
|||
# Role `docker`
|
||||
|
||||
Makes sure Docker Engine and other related packages are installed from the Docker repos on the specified hosts.
|
||||
For details see: [`tasks/main/02_docker_install.yaml`](./tasks/main/02_docker_install.yaml).
|
||||
Ensures the Docker Engine and other related packages are installed from the Docker repos.
|
||||
For detailed list of packages see: [`tasks/main/02_docker_install.yaml`](./tasks/main/02_docker_install.yaml).
|
||||
|
||||
## Supported Distributions
|
||||
|
||||
The following distributions are supported:
|
||||
|
||||
- Debian 11
|
||||
- Debian 12
|
||||
|
||||
## Required Arguments
|
||||
|
||||
None.
|
||||
|
||||
## Updates
|
||||
## Optional Arguments
|
||||
|
||||
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.
|
||||
None.
|
||||
|
||||
## Links & Resources
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
- name: make sure the Docker repo is setup
|
||||
- name: Ensure Docker repo is setup
|
||||
ansible.builtin.import_tasks:
|
||||
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:
|
||||
file: main/02_docker_install.yaml
|
||||
|
||||
- name: configure the Docker daemon
|
||||
- name: Ensure Docker daemon configuration
|
||||
ansible.builtin.import_tasks:
|
||||
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:
|
||||
url: https://download.docker.com/linux/debian/gpg
|
||||
dest: /etc/apt/trusted.gpg.d/docker.asc
|
||||
|
@ -7,7 +7,7 @@
|
|||
group: root
|
||||
become: true
|
||||
|
||||
- name: make sure Dockers APT repository is added
|
||||
- name: Ensure Docker APT repository is added
|
||||
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"
|
||||
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:
|
||||
name:
|
||||
- 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
|
||||
# https://docs.docker.com/engine/logging/drivers/journald/
|
||||
- name: configure Docker daemon
|
||||
- name: Ensure Docker daemon configuration
|
||||
ansible.builtin.copy:
|
||||
src: daemon.json
|
||||
dest: /etc/docker/daemon.json
|
||||
|
|
|
@ -2,10 +2,14 @@
|
|||
ansible.builtin.import_tasks:
|
||||
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
|
||||
ansible.builtin.import_tasks:
|
||||
file: main/02_nginx_install.yaml
|
||||
file: main/03_nginx_install.yaml
|
||||
|
||||
- name: Ensure configuration deployment
|
||||
ansible.builtin.import_tasks:
|
||||
file: main/03_config_deploy.yaml
|
||||
file: main/04_config_deploy.yaml
|
||||
|
|
|
@ -37,10 +37,3 @@
|
|||
group: root
|
||||
mode: "0644"
|
||||
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