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] ***************************************************************************************
changed: [165.227.228.104]

PLAY RECAP ***********************************************************************************************************************************
165.227.228.104 : ok=47 changed=37 unreachable=0 failed=0
localhost : ok=7 changed=1 unreachable=0 failed=0

Going to the IP address in your browser should present you with something like the following page:

You should be able to log in using the new password we set in the common.yml file. Have a play with the WordPress installation; when you are ready, destroy the Droplet from within the DigitalOcean control panel. But remember: leaving the Droplet running will incur a cost.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.78.106