Tag 'services' should only deploy services

This commit is contained in:
Sam A. 2023-04-26 23:16:18 +02:00
parent 65d8710c29
commit d6164825ee
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA
3 changed files with 24 additions and 27 deletions

View file

@ -1,12 +1,5 @@
# vim: ft=yaml.ansible
---
- name: Create base directory for Docker volumes
ansible.builtin.file:
path: "{{ base_volume }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Copy Docker daemon config file
ansible.builtin.copy:
src: dockerd/daemon.json
@ -17,20 +10,3 @@
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Create Docker network for services
community.docker.docker_network:
name: services
state: present
- name: Create Docker network for Tor
community.docker.docker_network:
name: tor
state: present
- name: Copy nginx.conf to shared location
ansible.builtin.copy:
src: shared/nginx.conf
dest: "{{ base_volume }}/nginx.conf"
owner: root
mode: u=rw,g=r,o=r

View file

@ -39,9 +39,6 @@
- name: Configure Docker
ansible.builtin.import_tasks: config.yml
tags:
- services
- reboot
- name: Set up Docker services
ansible.builtin.import_tasks: services.yml

View file

@ -1,5 +1,29 @@
# vim: ft=yaml.ansible
---
- name: Create Docker network for services
community.docker.docker_network:
name: services
state: present
- name: Create Docker network for Tor
community.docker.docker_network:
name: tor
state: present
- name: Create base directory for Docker volumes
ansible.builtin.file:
path: "{{ base_volume }}"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Copy nginx.conf to shared location
ansible.builtin.copy:
src: shared/nginx.conf
dest: "{{ base_volume }}/nginx.conf"
owner: root
mode: u=rw,g=r,o=r
- name: Deploy services
ansible.builtin.include_tasks: services/{{ item.key }}.yml
loop: "{{ services | dict2items }}"