In this section, we will now create the playbook and roles to generate our cloud health report. Once the playbook is executed, the output and end result will be a single report with some of the monitoring checks that we reviewed in the previous section. Just as shown in the last chapter, the report can be saved into a directory of your choice. This time around, we have broken up the tasks into three roles in order to keep things simple. Let's review each role in the following sections:
The first role that we will create will include the tasks needed to set up the foundation for the cloud health report. The name of the file will be main.yml
located within the role directory named cloud-infra-check/tasks
. The contents of this file will look similar to this:
--- - name: Create working directory shell: mkdir {{ REPORT_DIR }} ignore_errors: yes - name: Copy the Infrastructure services check script template: src=infra_check.sh dest={{ DEPLOY_LOC }...