Exercise 1.4 - Running the apache-basic-playbook

Return to Workshop

Congratulations! You just wrote a playbook that incorporates some key Ansible concepts that you use in most, if not all, of your future playbooks. Before you get too excited though, we should probably make sure it actually runs. So, let’s do that now.

Section 1 - Running your new apache playbook

Step 1: Create a host file

Make sure you are in the right directory and create a host file.

cd ~/apache-basic-playbook
Since you already did the work of creating a host file in Lession 1.0, feel free to re-use it.

Step 2: Run your playbook

Run your playbook, using the following command.

ansible-playbook -i ../hosts site.yml --private-key=~/.ssh/example-tower

Section 2: Review

If successful, you should see standard output that looks very similar to the following. If not, just let us know. We’ll help get things fixed up.

stdout 2
Figure 1: apache-basic-playbook stdout

Workshop Details

Student ID:
Workshop:
Region:

Domain:
Workshop Name:
Region:
User ID:

Return to Workshop