The playbook
We will split the playbook into a few different roles to run the various scanning tools that will be running in the chapter – as you can see from the site.yml
file, we are adding some conditions to the roles containing our tasks. The start of the file looks like all of the other playbook files we have been running:
- name: "Scan our WordPress Ansible Playbook and stack" hosts: ansible_hosts gather_facts: true become: true become_method: "ansible.builtin.sudo" vars_files: - 'group_vars/common.yml'
As mentioned, roles are where this playbook starts to differ from the previous playbooks we have been running up to this point in the book.
As you can see from the following source, we are defining tags alongside the roles themselves:
roles: - { role: 'common', tags: ['openscap','scan&apos...