summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKelley Spoon <kelley.spoon@linaro.org>2018-12-19 14:08:24 -0600
committerKelley Spoon <kelley.spoon@linaro.org>2018-12-27 12:35:47 +0000
commit21cf447145292297403dd3f827cd290f1af98996 (patch)
treec02e735513d642188d39c0fc2f179731ed88f10b
parent06c56a6c5605b77f3320a9529c9d3787fa96181f (diff)
ApacheSite: deprecation update for apt task
Ansible 2.7.5 has started issuing deprecation warnings for apt tasks that use a with_items loop. This change updates the apt task to properly specify a list of packages in vars and use the "pkg" attribute instead of "name" to install packages. Change-Id: I834e45dfe392f3dad68ac6fda546151c0c6b7f20 Reviewed-on: https://review.linaro.org/29583 Reviewed-by: Benjamin Copeland <ben.copeland@linaro.org>
-rw-r--r--roles/apache-site/tasks/main.yml7
1 files changed, 4 insertions, 3 deletions
diff --git a/roles/apache-site/tasks/main.yml b/roles/apache-site/tasks/main.yml
index 14118580..74880fad 100644
--- a/roles/apache-site/tasks/main.yml
+++ b/roles/apache-site/tasks/main.yml
@@ -1,8 +1,9 @@
---
- name: Install OS dependencies
- apt: name={{ item }} update_cache=yes
- with_items:
- - apache2
+ apt: pkg={{ packages }} update_cache=yes
+ vars:
+ packages:
+ - apache2
- name: Install Apache site config
template: src=files/{{src}} dest=/etc/apache2/sites-available/{{config}} mode=0644 backup=yes