--- - name: Create prometheus dirs file: path: "{{ item }}" owner: "{{ prometheus_puid }}" group: "{{ prometheus_pgid }}" mode: '755' state: directory loop: - "{{ prometheus_config }}" - "{{ prometheus_data }}" become: true - name: Place prometheus config template: owner: "{{ prometheus_puid }}" group: "{{ prometheus_pgid}}" src: "templates/aya01/prometheus/prometheus.yml.j2" dest: "{{ prometheus_config }}/prometheus.yml" mode: '644' become: true