|
|
@ -1,20 +1,37 @@ |
|
|
|
--- |
|
|
|
--- |
|
|
|
|
|
|
|
|
|
|
|
- name: Create main folder for configuration files |
|
|
|
- name: Create conf folder |
|
|
|
file: |
|
|
|
file: |
|
|
|
path: "{{ wh_docker_root_dir }}/conf" |
|
|
|
path: "{{ wh_docker_root_dir }}/conf" |
|
|
|
state: directory |
|
|
|
state: directory |
|
|
|
owner: bin |
|
|
|
owner: root |
|
|
|
group: wheel |
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Create folders for each containers |
|
|
|
- name: Create containers folders for conf |
|
|
|
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 }}" |
|
|
|
state: directory |
|
|
|
state: directory |
|
|
|
owner: bin |
|
|
|
owner: root |
|
|
|
group: wheel |
|
|
|
group: root |
|
|
|
|
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create wordpress folder |
|
|
|
|
|
|
|
file: |
|
|
|
|
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress" |
|
|
|
|
|
|
|
state: directory |
|
|
|
|
|
|
|
owner: root |
|
|
|
|
|
|
|
group: root |
|
|
|
|
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create containers folders for wordpress |
|
|
|
|
|
|
|
with_items: "{{ wh_docker }}" |
|
|
|
|
|
|
|
file: |
|
|
|
|
|
|
|
path: "{{ wh_docker_root_dir }}/wordpress/{{ item.wh_docker_name }}" |
|
|
|
|
|
|
|
state: directory |
|
|
|
|
|
|
|
owner: root |
|
|
|
|
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Deploy docker-compose YML file |
|
|
|
- name: Deploy docker-compose YML file |
|
|
@ -22,26 +39,18 @@ |
|
|
|
template: |
|
|
|
template: |
|
|
|
src: docker-compose.j2 |
|
|
|
src: docker-compose.j2 |
|
|
|
dest: "{{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}/docker-compose.yml" |
|
|
|
dest: "{{ wh_docker_root_dir }}/conf/{{ item.wh_docker_name }}/docker-compose.yml" |
|
|
|
owner: bin |
|
|
|
owner: root |
|
|
|
group: wheel |
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 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 |
|
|
|
- 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" |
|
|
|
state: touch |
|
|
|
state: touch |
|
|
|
owner: bin |
|
|
|
owner: root |
|
|
|
group: wheel |
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Create custom CRON config file for each containers |
|
|
|
- name: Create custom CRON config file for each containers |
|
|
@ -49,8 +58,8 @@ |
|
|
|
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" |
|
|
|
state: touch |
|
|
|
state: touch |
|
|
|
owner: bin |
|
|
|
owner: root |
|
|
|
group: wheel |
|
|
|
group: root |
|
|
|
mode: '0644' |
|
|
|
mode: '0644' |
|
|
|
|
|
|
|
|
|
|
|
- name: Restart Docker |
|
|
|
- name: Restart Docker |
|
|
|