- name: Install and configure telegraf import_role: name: rossmcdonald.telegraf become: true - name: Let telegraf do smart stats lineinfile: path: /etc/sudoers line: "{{ telegraf_runas_user }} ALL=(ALL) NOPASSWD: /usr/sbin/smartctl" become: true