Skip to content

Commit c1600c7

Browse files
committed
remove loops in yum/apt playbook commands
Change-Id: Idb15a3737c1950fa8be6f1fd9cf07fb35b16aaa3 Reviewed-on: https://review.couchbase.org/c/perfrunner/+/168200 Tested-by: Build Bot <[email protected]> Reviewed-by: vikas chaudhary <[email protected]>
1 parent 32efbf9 commit c1600c7

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

playbooks/clients.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
- name: upgrading packages on the system
55
apt: upgrade=dist
66
- name: installing additional packages
7-
apt: name={{item}} update_cache=yes
8-
with_items:
7+
apt:
8+
update_cache: yes
9+
name:
910
- atop
1011
- cpufrequtils
1112
- git
@@ -28,11 +29,12 @@
2829
- name: adding Couchbase repository
2930
apt: deb=https://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-amd64.deb
3031
- name: installing libcouchbase
31-
apt: name={{item}} update_cache=yes
32-
with_items:
33-
- build-essential
34-
- libcouchbase-dev
35-
- libcouchbase2-bin
36-
- libcouchbase2-libevent
32+
apt:
33+
update_cache: yes
34+
name:
35+
- build-essential
36+
- libcouchbase-dev
37+
- libcouchbase2-bin
38+
- libcouchbase2-libevent
3739
- name: disabling scheduled fstrim jobs
3840
file: path=/etc/cron.weekly/fstrim state=absent

playbooks/servers.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
- name: upgrading packages on the system
55
yum: state=latest name=epel-release
66
- name: installing additional packages
7-
yum: state=latest name={{item}}
8-
with_items:
7+
yum:
8+
state: latest
9+
name:
910
- atop
1011
- fio
1112
- gdb

playbooks/servers_vagrant.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
baseurl: https://download.fedoraproject.org/pub/epel/$releasever/$basearch/
1515
gpgcheck: no
1616
- name: installing additional packages
17-
yum: state=latest name={{item}}
18-
with_items:
17+
yum:
18+
state: latest
19+
name:
1920
- atop
2021
- fio
2122
- gdb

playbooks/uninstall.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@
3636
- 9999
3737

3838
- name: uninstalling the database packages
39-
yum: state=absent name={{item}}
40-
with_items:
39+
yum:
40+
state: absent
41+
name:
4142
- 'couchbase*'
4243
- 'mongodb*'
4344
- 'MariaDB*'

0 commit comments

Comments
 (0)