From f56d2ba7d630e3304645b4f5e0c4169d19ee524d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 18 Jan 2017 15:28:25 -0500 Subject: [PATCH] ansible: Replace sudo by become Signed-off-by: Michael Jeanson --- automation/ansible/playbooks/dist-upgrade.yml | 6 +++--- automation/ansible/roles/lttng-modules/tasks/main.yml | 4 ++-- automation/ansible/roles/tracecompass/tasks/main.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/automation/ansible/playbooks/dist-upgrade.yml b/automation/ansible/playbooks/dist-upgrade.yml index 13cce73..db90380 100644 --- a/automation/ansible/playbooks/dist-upgrade.yml +++ b/automation/ansible/playbooks/dist-upgrade.yml @@ -18,7 +18,7 @@ - name: apt-get dist-upgrade apt: upgrade=dist - - name: apt-get autoremove + - name: apt-get autoremove command: apt-get -y --purge autoremove register: autoremove_output changed_when: "'The following packages will be REMOVED' in autoremove_output.stdout" @@ -30,7 +30,7 @@ ignore_errors: true when: reboot == "yes" register: last_result - + - name: wait for the server to reboot local_action: wait_for host={{ inventory_hostname }} port=22 @@ -38,4 +38,4 @@ timeout=300 state=started when: last_result.changed - sudo: false + become: false diff --git a/automation/ansible/roles/lttng-modules/tasks/main.yml b/automation/ansible/roles/lttng-modules/tasks/main.yml index e7eb36f..b832a5e 100644 --- a/automation/ansible/roles/lttng-modules/tasks/main.yml +++ b/automation/ansible/roles/lttng-modules/tasks/main.yml @@ -22,5 +22,5 @@ git: repo=git://artifacts.internal.efficios.com/git/linux-stable.git dest=/home/jenkins/gitcache/linux-stable.git bare=yes - sudo: yes - sudo_user: jenkins + become: yes + become_user: jenkins diff --git a/automation/ansible/roles/tracecompass/tasks/main.yml b/automation/ansible/roles/tracecompass/tasks/main.yml index cae4e99..1c5a686 100644 --- a/automation/ansible/roles/tracecompass/tasks/main.yml +++ b/automation/ansible/roles/tracecompass/tasks/main.yml @@ -19,5 +19,5 @@ git: repo=git://artifacts.internal.efficios.com/git/org.eclipse.tracecompass.git dest=/home/jenkins/gitcache/org.eclipse.tracecompass.git bare=yes - sudo: yes - sudo_user: jenkins + become: yes + become_user: jenkins -- 2.34.1