Running the playbook

Now that we have all of the pieces of the playbook together, we can launch a Droplet and install WordPress by running:

$ ansible-playbook -i production --vault-id @prompt site.yml

It will take a little while to launch the Droplet and perform the installation; at the end of it you should have the IP address listed in the play overview as the IP address is used as the name of our Droplet host. Here is the end of my playbook run:

RUNNING HANDLER [roles/stack-config : restart nginx] *****************************************************************************************changed: [165.227.228.104]RUNNING HANDLER [roles/stack-config : restart php-fpm] *************************************************************************************** ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.