infrastructure/ansible/roles/aurto/tasks/nginx.yml
Jake Howard 2af9f8529d
All checks were successful
/ terraform (push) Successful in 46s
/ ansible (push) Successful in 1m53s
Fix new ansible-lint errors
Quite a few changes here, hopefully they work!
2023-06-15 15:16:19 +01:00

30 lines
547 B
YAML

- name: Install nginx
package:
name: nginx
become: true
- name: Enable nginx
service:
name: nginx
enabled: true
become: true
- name: Add a user to a password file and ensure permissions are set
community.general.htpasswd:
path: /etc/nginx/.htpasswd
name: aurto
password: aurto
owner: http
group: http
mode: "600"
become: true
notify: restart nginx
- name: Nginx config
template:
src: files/nginx.conf
dest: /etc/nginx/nginx.conf
mode: "600"
become: true
notify: restart nginx