Commit dce4594a authored by nanahira's avatar nanahira

add services

parent ff762595
......@@ -64,3 +64,4 @@ typings/
/roles/init
/files/samba-data
/files/services
---
- hosts: docker
- hosts: services
remote_user: root
tasks:
- name: directory
file:
path: '{{path}}'
path: '{{ service_path }}'
state: directory
- name: docker-compose file
template:
src: 'files/docker-compose/{{ project_name }}/.yml.j2'
dest: '{{path}}/docker-compose.yml'
src: 'files/services/{{ service_name }}.yml.j2'
dest: '{{ service_path }}/docker-compose.yml'
- name: data
become: true
synchronize:
src: 'files/docker-compose/{{ project_name }}/'
dest: '{{path}}/data'
src: 'files/services/{{ service_name }}/'
dest: '{{ service_path }}/data'
delete: yes
copy_links: yes
recursive: yes
verify_host: no
checksum: yes
archive: no
- name: docker-compose up -d
docker_compose:
project_src: '{{path}}'
project_src: '{{ service_path }}'
remove_orphans: true
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