I am writing an ansible script to deploy django in centos 7. My problem is with nginx.
I have created /etc/nginx/sites-available and /etc/nginx/sites-enabled directories and have to include sites-available in /etc/nginx/nginx.conf file at the bottom if http { } block.
How do I insert the line include /etc/nginx/sites-available/*.conf
inside the http {} block in my ansible script after creating the respective directories and copying the configuration files?
The output should be
http {
.....
.....
server {
.......
}
include /etc/nginx/sites-available/*.conf;
}