--- - name: "Generate config: /etc/prometheus/prometheus.yml" copy: content: "#\n# !!! This file is managed by Ansible !!!\n#\n\n{{ services.prometheus.config | to_nice_yaml }}" dest: /etc/prometheus/prometheus.yml notify: "Restart prometheus"