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
This commit is contained in:
Drew Walters 2018-11-21 18:33:05 -06:00
parent 6d6a598945
commit 77cd63509b
1 changed files with 5 additions and 4 deletions

View File

@ -18,13 +18,14 @@
shell: | shell: |
set -xe; set -xe;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
sudo apt-add-repository \ apt-add-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \ $(lsb_release -cs) \
stable" stable"
sudo apt-get update apt-get update
sudo apt-get install --no-install-recommends -y docker-ce apt-get install --no-install-recommends -y docker-ce
args: args:
chdir: "{{ zuul.project.src_dir }}" chdir: "{{ zuul.project.src_dir }}"
become: yes