---
# Enable or reconfigure monitoring on instances
# Usage: ansible-playbook playbooks/monitoring.yml [--limit hostname]

- name: Configure Monitoring
  hosts: changemaker_instances
  become: true

  roles:
    - monitoring

  post_tasks:
    - name: Monitoring summary
      ansible.builtin.debug:
        msg: |
          Monitoring configured for {{ cml_domain }}
          Profile: {{ 'enabled' if cml_monitoring_enabled | bool else 'disabled' }}
          Remote write: {{ 'enabled → ' + bunker_ops_remote_write_url if bunker_ops_enabled | bool else 'disabled' }}
