Skip to content

Commit 2c09dbc

Browse files
Merge pull request #153 from vojtechtrefny/main_ansible-with
misc: Do not use "with_items" when installing packages
2 parents 7024347 + bd59a81 commit 2c09dbc

File tree

1 file changed

+42
-36
lines changed

1 file changed

+42
-36
lines changed

misc/libbytesize-tasks.yml

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
---
55
##### Fedora
66
- name: Install basic build tools (Fedora)
7-
package: name={{item}} state=present
8-
with_items:
9-
- gcc
10-
- make
11-
- libtool
12-
- autoconf
13-
- automake
7+
package:
8+
state: present
9+
name:
10+
- gcc
11+
- make
12+
- libtool
13+
- autoconf
14+
- automake
1415
when: ansible_distribution == 'Fedora'
1516

1617
- name: Install dnf-plugins-core for dnf builddep (Fedora)
@@ -22,24 +23,26 @@
2223
when: ansible_distribution == 'Fedora'
2324

2425
- name: Install test dependencies (Fedora)
25-
package: name={{item}} state=present
26-
with_items:
27-
- glibc-all-langpacks
28-
- python3-polib
29-
- python3-pocketlint
30-
- python3-pylint
31-
- python3-pycodestyle
26+
package:
27+
state: present
28+
name:
29+
- glibc-all-langpacks
30+
- python3-polib
31+
- python3-pocketlint
32+
- python3-pylint
33+
- python3-pycodestyle
3234
when: ansible_distribution == 'Fedora'
3335

3436
##### CentOS
3537
- name: Install basic build tools (CentOS)
36-
package: name={{item}} state=present
37-
with_items:
38-
- gcc
39-
- make
40-
- libtool
41-
- autoconf
42-
- automake
38+
package:
39+
state: present
40+
name:
41+
- gcc
42+
- make
43+
- libtool
44+
- autoconf
45+
- automake
4346
when: ansible_distribution == 'CentOS'
4447

4548
- name: Install dnf-plugins-core for dnf builddep (CentOS)
@@ -51,10 +54,11 @@
5154
when: ansible_distribution == 'CentOS'
5255

5356
- name: Install test dependencies (CentOS)
54-
package: name={{item}} state=present
55-
with_items:
56-
- glibc-all-langpacks
57-
- python3-pip
57+
package:
58+
state: present
59+
name:
60+
- glibc-all-langpacks
61+
- python3-pip
5862
when: ansible_distribution == 'CentOS'
5963

6064
- name: Install pylint, polib, pycodestyle and pocketlint using pip (CentOS)
@@ -65,10 +69,11 @@
6569

6670
##### Debian/Ubuntu
6771
- name: Install basic build tools (Debian/Ubuntu)
68-
package: name={{item}} state=present
69-
with_items:
70-
- gcc
71-
- make
72+
package:
73+
state: present
74+
name:
75+
- gcc
76+
- make
7277
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
7378

7479
- name: Add source repositories (Debian/Ubuntu)
@@ -87,13 +92,14 @@
8792
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
8893

8994
- name: Install test dependencies (Debian/Ubuntu)
90-
package: name={{item}} state=present
91-
with_items:
92-
- locales-all
93-
- python3-polib
94-
- python3-pip
95-
- pycodestyle
96-
- pylint
95+
package:
96+
state: present
97+
name:
98+
- locales-all
99+
- python3-polib
100+
- python3-pip
101+
- pycodestyle
102+
- pylint
97103
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
98104

99105
- name: Install pocketlint using pip (Debian/Ubuntu)

0 commit comments

Comments
 (0)