|
|
@ -1,6 +1,6 @@ |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
- name: Create main folder for configuration files |
|
|
|
- name: Create main folder for configuration files |
|
|
|
file: |
|
|
|
file: |
|
|
|
path: "{{ wh_docker_root_dir }}/conf" |
|
|
|
path: "{{ wh_docker_root_dir }}/conf" |
|
|
|
state: directory |
|
|
|
state: directory |
|
|
@ -8,7 +8,7 @@ |
|
|
|
group: wheel |
|
|
|
group: wheel |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Create folders for each containers |
|
|
|
- name: Create folders for each containers |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
file: |
|
|
|
file: |
|
|
|
path: "{{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}" |
|
|
|
path: "{{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}" |
|
|
@ -17,7 +17,7 @@ |
|
|
|
group: wheel |
|
|
|
group: wheel |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy docker-compose YML file |
|
|
|
- name: Deploy docker-compose YML file |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
template: |
|
|
|
template: |
|
|
|
src: docker-compose.j2 |
|
|
|
src: docker-compose.j2 |
|
|
@ -26,7 +26,16 @@ |
|
|
|
group: wheel |
|
|
|
group: wheel |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Create custom PHP config file for each containers |
|
|
|
|
|
|
|
|
|
|
|
- name: Create main folder for Wordpress files |
|
|
|
|
|
|
|
file: |
|
|
|
|
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress" |
|
|
|
|
|
|
|
state: directory |
|
|
|
|
|
|
|
owner: bin |
|
|
|
|
|
|
|
group: wheel |
|
|
|
|
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create custom PHP config file for each containers |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
file: |
|
|
|
file: |
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom.ini" |
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom.ini" |
|
|
@ -35,7 +44,7 @@ |
|
|
|
group: wheel |
|
|
|
group: wheel |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Create custom CRON config file for each containers |
|
|
|
- name: Create custom CRON config file for each containers |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
file: |
|
|
|
file: |
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom_cron" |
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}/custom_cron" |
|
|
@ -44,10 +53,10 @@ |
|
|
|
group: wheel |
|
|
|
group: wheel |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Restart Docker |
|
|
|
- name: Restart Docker |
|
|
|
service: name=docker state=restarted |
|
|
|
service: name=docker state=restarted |
|
|
|
|
|
|
|
|
|
|
|
- name: Launch containers |
|
|
|
- name: Launch containers |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
command: "docker-compose -f {{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}/docker-compose.yml up -d" |
|
|
|
command: "docker-compose -f {{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}/docker-compose.yml up -d" |
|
|
|
|
|
|
|
|
|
|
|