From 77cd63509b98d9e2e55934be6b4568c4eda67d82 Mon Sep 17 00:00:00 2001 From: Drew Walters Date: Wed, 21 Nov 2018 18:33:05 -0600 Subject: [PATCH] zuul: Remove sudo from install-docker playbook Ansible recommends the use `become: yes` over `sudo` in playbooks and only allows the use of `sudo` for backwards compatibility. This commit removes sudo from the install-docker playbook. [0] https://docs.ansible.com/ansible/2.7/user_guide/become.html#id1 Change-Id: I3edf82ee118827b8d94f169778463152ebc044f8 --- tools/gate/playbooks/install-docker.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/gate/playbooks/install-docker.yaml b/tools/gate/playbooks/install-docker.yaml index ba8201a1f..7c39e66e8 100644 --- a/tools/gate/playbooks/install-docker.yaml +++ b/tools/gate/playbooks/install-docker.yaml @@ -18,13 +18,14 @@ shell: | set -xe; - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - - sudo apt-add-repository \ + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - + apt-add-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) \ stable" - sudo apt-get update - sudo apt-get install --no-install-recommends -y docker-ce + apt-get update + apt-get install --no-install-recommends -y docker-ce args: chdir: "{{ zuul.project.src_dir }}" + become: yes