Let's create a playbook that uses the hostname of a server. Let do some things with it including pushing the information to an apache index.html file. This is so when you connect to the server on port 80 you see the hostname of the server.
We add the info to the file, install apache and restart it. We also set the apache to auto start on boot.