As we have all of the basic roles in place, we can try running the playbook; before doing so, we need to update the site.yml to include a play for our scan host:
---- hosts: scan gather_facts: true become: yes become_method: sudo vars_files: - group_vars/common.yml roles: - roles/docker- hosts: wordpress gather_facts: true become: yes become_method: sudo vars_files: - group_vars/common.yml roles: - roles/stack-install - roles/stack-config - roles/wordpress
Once updated, we can run our playbook using the code:
$ ansible-playbook -i production site.yml
This should give us something like the following output:
PLAY [scan] *************************************************************************************TASK [Gathering ...