--- # Playbook to set up monitoring modules - name: Install and configure the control node hosts: monitoring become: yes roles: - grafana - name: Install and configure Prometheus node - Main node hosts: monitoring become: yes roles: - prometheus - blackbox-exporter vars: scrape_files: - /etc/prometheus/scrape-main.yml - /etc/prometheus/scrape-blackbox.yml - name: Install and configure nodes hosts: all become: yes roles: - node-exporter