From 56418ef3a8ebed8becc01b70e3223d34b422b18f Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Thu, 11 Oct 2018 10:39:34 +0200 Subject: [PATCH] Improve setup-gate This includes a small optimisation to make sure the packages are passed as a list instead of iterating over them in the apt commands. It also ensures the argument "recurse" is passed into the copy argument, as this was not done previously. Change-Id: If93fda5a2efad550b5d58e215f2f7ef9a06cdacf --- playbooks/setup-gate.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/playbooks/setup-gate.yaml b/playbooks/setup-gate.yaml index dec6b7a..1d3eb34 100644 --- a/playbooks/setup-gate.yaml +++ b/playbooks/setup-gate.yaml @@ -38,11 +38,10 @@ - apt_repository: repo: deb http://{{ zuul_site_mirror_fqdn }}/deb-docker xenial stable - apt: - name: "{{ item }}" + name: + - docker-ce + - python-pip allow_unauthenticated: True - with_items: - - docker-ce - - python-pip - pip: name: docker version: 2.7.0 @@ -67,6 +66,7 @@ path: "{{ item.path }}" owner: "{{ item.owner }}" state: directory + recurse: "{{ item.recurse | default(omit) }}" with_items: - path: /logs/apache/ owner: zuul @@ -82,8 +82,7 @@ - src: files/apache.conf dest: /webroot/ - apt: - name: "{{ item }}" - with_items: - - apache2 - - gitweb + name: + - apache2 + - gitweb become: True