Commit dce4594a authored by nanahira's avatar nanahira

add services

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