automation/ansible/roles/deploy/tasks/wordpress.yml

27 lines
585 B
YAML
Raw Normal View History

2020-04-09 15:29:12 +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-09 15:29:12 +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-09 15:29:12 +00:00
- name: Verify nginx configuration
command: "nginx -t"
become: yes
2020-04-29 15:15:49 +00:00
tags: nginx
2020-04-09 15:29:12 +00:00
- name: Restart nginx service
service:
name: nginx
state: restarted
2020-04-29 15:15:49 +00:00
become: yes
tags: nginx