18 lines
361 B
YAML
18 lines
361 B
YAML
---
|
|
- name: Install nginx
|
|
apt:
|
|
name: nginx
|
|
state: present
|
|
|
|
- name: Disable nginx server_tokens
|
|
lineinfile:
|
|
path: /etc/nginx/nginx.conf
|
|
line: "\tserver_tokens off;"
|
|
regexp: "server_tokens"
|
|
notify: reload nginx
|
|
|
|
- name: Clear default nginx site
|
|
file:
|
|
state: absent
|
|
path: /etc/nginx/sites-enabled/default
|
|
notify: reload nginx
|