Initial
This commit is contained in:
9
roles/nginx/handlers/main.yaml
Normal file
9
roles/nginx/handlers/main.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
- name: restart nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
|
||||
- name: start nginx
|
||||
service:
|
||||
name: nginx
|
||||
state: started
|
34
roles/nginx/tasks/main.yaml
Normal file
34
roles/nginx/tasks/main.yaml
Normal file
@ -0,0 +1,34 @@
|
||||
- name: Install dependencies
|
||||
apt:
|
||||
pkg:
|
||||
- curl
|
||||
- gnupg2
|
||||
- ca-certificates
|
||||
- lsb-release
|
||||
- ubuntu-keyring
|
||||
state: present
|
||||
update_cache: true
|
||||
|
||||
- name: Import nginx key
|
||||
apt_key:
|
||||
url: https://nginx.org/keys/nginx_signing.key
|
||||
state: present
|
||||
|
||||
- name: Setup repository
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://packages.nginx.org/nginx-quic/ubuntu {{ ansible_facts['distribution_release'] }} nginx-quic"
|
||||
state: present
|
||||
filename: nginx-quic
|
||||
|
||||
- name: Install nginx
|
||||
apt:
|
||||
pkg:
|
||||
- nginx-quic
|
||||
- nginx-quic-module-geoip
|
||||
- nginx-quic-module-image-filter
|
||||
- nginx-quic-module-njs
|
||||
- nginx-quic-module-perl
|
||||
- nginx-quic-module-xslt
|
||||
state: present
|
||||
update_cache: true
|
||||
notify: start nginx
|
Reference in New Issue
Block a user