Skip to content

Commit 17c115b

Browse files
authored
update to non-loop "apt:" module usage
This removes the deprecation warning which suggests removing the loop and use the "name:" with multiple items.
1 parent 9d97644 commit 17c115b

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

drupal/provisioning/playbook.yml

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,40 @@
1515

1616
tasks:
1717
- name: Get software for apt repository management.
18-
apt: "name={{ item }} state=present"
19-
with_items:
20-
- python-apt
21-
- python-pycurl
18+
apt:
19+
state: present
20+
name:
21+
- python-apt
22+
- python-pycurl
2223

2324
- name: Add ondrej repository for later versions of PHP.
2425
apt_repository: repo='ppa:ondrej/php' update_cache=yes
2526

2627
- name: "Install Apache, MySQL, PHP, and other dependencies."
27-
apt: "name={{ item }} state=present"
28-
with_items:
29-
- git
30-
- curl
31-
- unzip
32-
- sendmail
33-
- apache2
34-
- php7.1-common
35-
- php7.1-cli
36-
- php7.1-dev
37-
- php7.1-gd
38-
- php7.1-curl
39-
- php7.1-json
40-
- php7.1-opcache
41-
- php7.1-xml
42-
- php7.1-mbstring
43-
- php7.1-pdo
44-
- php7.1-mysql
45-
- php-apcu
46-
- libpcre3-dev
47-
- libapache2-mod-php7.1
48-
- python-mysqldb
49-
- mysql-server
28+
apt:
29+
state: present
30+
name:
31+
- git
32+
- curl
33+
- unzip
34+
- sendmail
35+
- apache2
36+
- php7.1-common
37+
- php7.1-cli
38+
- php7.1-dev
39+
- php7.1-gd
40+
- php7.1-curl
41+
- php7.1-json
42+
- php7.1-opcache
43+
- php7.1-xml
44+
- php7.1-mbstring
45+
- php7.1-pdo
46+
- php7.1-mysql
47+
- php-apcu
48+
- libpcre3-dev
49+
- libapache2-mod-php7.1
50+
- python-mysqldb
51+
- mysql-server
5052

5153
- name: Disable the firewall (since this is for local dev only).
5254
service: name=ufw state=stopped

0 commit comments

Comments
 (0)