- become: yes package: name: "{{ items }}" state: present vars: items: - prometheus-node-exporter - name: /etc/default/prometheus-node-exporter become: yes copy: dest: /etc/default/prometheus-node-exporter content: | # Set the command-line arguments to pass to the server. # Due to shell escaping, to pass backslashes for regexes, you need to double # them (\\d for \d). If running under systemd, you need to double them again # (\\\\d to mean \d), and escape newlines too. ARGS="" notify: restart