Tag 'services' should only deploy services
This commit is contained in:
parent
0d7fcf0c7c
commit
e8926785c3
|
@ -1,12 +1,5 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
- name: Create base directory for Docker volumes
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: "{{ base_volume }}"
|
|
||||||
owner: root
|
|
||||||
mode: u=rwx,g=rx,o=rx
|
|
||||||
state: directory
|
|
||||||
|
|
||||||
- name: Copy Docker daemon config file
|
- name: Copy Docker daemon config file
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: daemon.json.j2
|
src: daemon.json.j2
|
||||||
|
@ -23,11 +16,4 @@
|
||||||
loop:
|
loop:
|
||||||
- docker.socket
|
- docker.socket
|
||||||
- docker.service
|
- docker.service
|
||||||
|
when: "{{ stop is undefined or not stop }}"
|
||||||
- name: Create Docker network for services
|
|
||||||
community.docker.docker_network:
|
|
||||||
name: services
|
|
||||||
ipam_config:
|
|
||||||
- subnet: 172.16.0.0/16
|
|
||||||
gateway: 172.16.0.1
|
|
||||||
state: present
|
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
- name: Configure Docker
|
- name: Configure Docker
|
||||||
ansible.builtin.import_tasks: config.yml
|
ansible.builtin.import_tasks: config.yml
|
||||||
tags:
|
tags:
|
||||||
- services
|
|
||||||
- reboot
|
- reboot
|
||||||
|
|
||||||
- name: Set up Docker services
|
- name: Set up Docker services
|
||||||
|
|
|
@ -1,5 +1,20 @@
|
||||||
# vim: ft=yaml.ansible
|
# vim: ft=yaml.ansible
|
||||||
---
|
---
|
||||||
|
- name: Create Docker network for services
|
||||||
|
community.docker.docker_network:
|
||||||
|
name: services
|
||||||
|
ipam_config:
|
||||||
|
- subnet: 172.16.0.0/16
|
||||||
|
gateway: 172.16.0.1
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Create base directory for Docker volumes
|
||||||
|
ansible.builtin.file:
|
||||||
|
name: "{{ base_volume }}"
|
||||||
|
owner: root
|
||||||
|
mode: u=rwx,g=rx,o=rx
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Deploy services
|
- name: Deploy services
|
||||||
ansible.builtin.include_tasks: services/{{ item.key }}.yml
|
ansible.builtin.include_tasks: services/{{ item.key }}.yml
|
||||||
loop: "{{ services | dict2items }}"
|
loop: "{{ services | dict2items }}"
|
||||||
|
|
Reference in a new issue