From 044efc4a47522621b31c6302a61cb1048b713971 Mon Sep 17 00:00:00 2001 From: Ismael Date: Wed, 7 Sep 2016 18:45:49 -0300 Subject: [PATCH] Do "become" for the steps that require root access on Debian Actions with apt require being root. Add "become" to those. "sudo" is deprecated, changed it to "become" --- tasks/Debian.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/Debian.yml b/tasks/Debian.yml index be499f9..658afcc 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -13,6 +13,7 @@ name: "apt-transport-https" state: present when: not apt_https_transport.stat.exists + become: yes tags: - telegraf - packages @@ -21,6 +22,7 @@ apt_key: url: "https://repos.influxdata.com/influxdb.key" state: present + become: yes tags: - telegraf - packages @@ -30,6 +32,7 @@ repo: "deb https://repos.influxdata.com/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} stable" filename: "influxdb" state: present + become: yes tags: - telegraf - packages @@ -39,7 +42,7 @@ name=telegraf state=installed notify: "Restart Telegraf" - sudo: yes + become: yes tags: - telegraf - packages