From: Anil Belur Date: Thu, 2 May 2019 11:28:45 +0000 (+1000) Subject: Remove with_items for package installs X-Git-Tag: v0.3.1~3 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=1cb0f11add7a8494b6b22f4d55a5ab3f7b1ee3cd;p=releng%2Fcommon-packer.git Remove with_items for package installs Ansible supports lists passed to package install. With this we can avoid using with_items since this makes multiple calls to the packages manager slowing down the performance. Change-Id: Ieb09ed634533bcbbc60275aafd2c22b3d5c4086d Signed-off-by: Anil Belur --- diff --git a/provision/install-base-pkgs-Ubuntu.yaml b/provision/install-base-pkgs-Ubuntu.yaml index dc023e9..592568b 100644 --- a/provision/install-base-pkgs-Ubuntu.yaml +++ b/provision/install-base-pkgs-Ubuntu.yaml @@ -1,14 +1,11 @@ --- - name: Install base packages apt: - name: '{{pkg}}' + name: + - build-essential + - devscripts + - dh-systemd + - equivs + - gdebi state: latest - with_items: - - build-essential - - devscripts - - dh-systemd - - equivs - - gdebi - loop_control: - loop_var: pkg become: yes diff --git a/releasenotes/notes/remove-with-items-62e7f0682a338eb5.yaml b/releasenotes/notes/remove-with-items-62e7f0682a338eb5.yaml new file mode 100644 index 0000000..6e01892 --- /dev/null +++ b/releasenotes/notes/remove-with-items-62e7f0682a338eb5.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Ansible supports lists passed to package install that can avoid using + with_items. Using with_items makes multiple calls to the packages manager + slowing down the performance.