2020-04-28 09:59:52 +00:00
|
|
|
- name: "Launch the site's containers"
|
|
|
|
docker_compose:
|
|
|
|
project_src: "{{ sites_path }}/{{ item.slug }}"
|
|
|
|
state: present
|
|
|
|
build: yes
|
|
|
|
restarted: yes
|
2020-04-29 15:15:49 +00:00
|
|
|
tags: docker
|
2020-04-28 09:59:52 +00:00
|
|
|
|
|
|
|
- name: "Symlink nginx configuration to sites-enabled"
|
|
|
|
file:
|
|
|
|
src: "/etc/nginx/sites-available/{{ item.url }}"
|
|
|
|
dest: "/etc/nginx/sites-enabled/{{ item.url }}"
|
|
|
|
state: link
|
|
|
|
become: yes
|
2020-04-29 15:15:49 +00:00
|
|
|
tags: nginx
|
2020-04-28 09:59:52 +00:00
|
|
|
|
|
|
|
- name: Verify nginx configuration
|
|
|
|
command: "nginx -t"
|
|
|
|
become: yes
|
2020-04-29 15:15:49 +00:00
|
|
|
tags: nginx
|
2020-04-28 09:59:52 +00:00
|
|
|
|
|
|
|
- name: Restart nginx service
|
|
|
|
service:
|
|
|
|
name: nginx
|
|
|
|
state: restarted
|
2020-04-29 15:15:49 +00:00
|
|
|
become: yes
|
|
|
|
tags: nginx
|