vm-ansible/roles/webserver/tasks/main.yaml

27 lines
453 B
YAML
Raw Normal View History

---
2022-04-14 23:52:27 +02:00
- name: "Install Nginx via apt"
apt:
update_cache: yes
state: present
name:
- nginx
- name: Upload site config to destination
copy:
2022-04-14 23:52:27 +02:00
src: nginx.conf
dest: /etc/nginx/nginx.conf
mode: 644
owner: root
2022-04-14 23:52:27 +02:00
group: root
2022-04-14 23:52:27 +02:00
- name: Enable and restart nginx daemon
service:
2022-04-14 23:52:27 +02:00
name: nginx
state: restarted
enabled: yes
2022-02-05 20:00:55 +01:00
- name: Allow https port via ufw
community.general.ufw:
rule: allow
port: https