We have a lot of servers and vhosts and some of them use nignx, some httpd or apache for their domains. I want to write an ansible script that pulls the information out on what web server the vhost uses for its site, the problem is that a lot of them have all 3 web servers installed but only one is actually used for the site to run (others might have an active status).
I mean, I don't even know where to begin. A simple example of a bash script would be nice that accurately outputs the web server of the vhost.