Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.0 KiB

---
- name: Create main folder for configuration files
file:
path: "{{ wpdocker_root_dir }}/conf"
state: directory
owner: bin
group: wheel
mode: '0644'
- name: Create folders for each containers
with_items: "{{ wpdocker }}"
file:
path: "{{ wpdocker_root_dir }}/conf/{{ item.wpdocker_name }}"
state: directory
owner: bin
group: wheel
mode: '0644'
- name: Deploy docker-compose YML file
with_items: "{{ wpdocker }}"
template:
src: docker-compose.j2
dest: "{{ wpdocker_root_dir }}/conf/{{ item.wpdocker_name }}/docker-compose.yml"
owner: bin
group: wheel
mode: '0644'
- name: Launch containers
with_items: "{{ wpdocker }}"
command: "echo 'docker-compose -f {{ wpdocker_root_dir }}/conf/{{ item.wpdocker_name }}/docker-compose.yml up -d'"
# command: "docker-compose -f {{ wpdocker_root_dir }}/conf/{{ item.wpdocker_name }}/docker-compose.yml" up -d
# - name: Send an welcome email message
# TODO