vm-ansible/roles/webserver/tasks/main.yaml
2022-04-16 14:21:53 +02:00

32 lines
529 B
YAML

---
- name: "Install Nginx via apt"
apt:
update_cache: yes
state: present
name:
- nginx
- name: Enable and restart nginx daemon
service:
name: nginx
state: restarted
enabled: yes
- name: Upload site config to destination
copy:
src: nginx.conf
dest: /etc/nginx/nginx.conf
mode: 644
owner: root
group: root
- name: Reload nginx daemon
service:
name: nginx
state: reloaded
- name: Allow https port via ufw
community.general.ufw:
rule: allow
port: https