22 lines
465 B
YAML
22 lines
465 B
YAML
|
---
|
||
|
- name: Install packages
|
||
|
ansible.builtin.apt:
|
||
|
update_cache: true
|
||
|
cache_valid_time: 3600
|
||
|
name:
|
||
|
- nginx
|
||
|
become: true
|
||
|
|
||
|
- name: Remove default nginx config
|
||
|
ansible.builtin.file:
|
||
|
path: "/etc/nginx/sites-enabled/default"
|
||
|
state: absent
|
||
|
become: true
|
||
|
|
||
|
- name: Copy wordpress nginx config
|
||
|
ansible.builtin.template:
|
||
|
src: "wordpress.conf.j2"
|
||
|
dest: "/etc/nginx/sites-enabled/wordpress.conf"
|
||
|
notify: restart nginx
|
||
|
become: true
|