How to change NginX default page to blank using Ansible?
I need to change the default Welcome to nginx!
page to blank.
CodePudding user response:
In the example below the module file
is being used to simply delete existing index.html and creates an empty one.
- hosts: webserver
tasks:
- name: Delete file
file:
path: /var/www/html/index.html
state: absent
- name: Create empty index.html file
file:
path: /var/www/html/index.html
state: touch