Commit 624df4bb authored by nanahira's avatar nanahira

improve services

parent c8f46206
---
- name: restart all docker services
docker_compose:
project_src: '{{handler.path}}'
restarted: yes
......@@ -4,3 +4,9 @@
project_src: '{{handler.path}}'
restarted: yes
services: '{{handler.services}}'
when: handler.services[0] != 'all'
- name: restart all docker services
docker_compose:
project_src: '{{handler.path}}'
restarted: yes
when: handler.services[0] == 'all'
......@@ -52,7 +52,7 @@
group: '{{ ansible_user_id }}'
follow: yes
when: service_name == "frpc"
notify: handle_frpc
notify: handle
- name: docker-compose up -d
docker_compose:
project_src: '{{ ansible_user_dir }}/{{ service_path }}'
......@@ -67,12 +67,4 @@
type: docker
path: '{{ ansible_user_dir }}/{{ service_path }}'
services: '{{ handle_services }}'
when: handle_services
- name: handle_frpc
include_tasks: 'handlers/docker.yaml'
vars:
handler:
type: docker
path: '{{ ansible_user_dir }}/{{ service_path }}'
services: '{{ frpc_instances | map(attribute="name") }}'
when: service_name == "frpc"
when: handle_services and handle_services | length > 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment