automation/ansible/roles/deploy/tasks/wordpress.yml
2020-04-09 17:29:12 +02:00

23 lines
No EOL
528 B
YAML

- name: "Launch the site's containers"
docker_compose:
project_src: "{{ sites_path }}/{{ item.slug }}"
state: present
build: yes
restarted: yes
- 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
- name: Verify nginx configuration
command: "nginx -t"
become: yes
- name: Restart nginx service
service:
name: nginx
state: restarted
become: yes