ansible: pass list to package managers instead of looping
Passing the list and letting the package manager deal with it as a whole is much faster than looping, which is equivalent to invoking the package manager multiple times, each time with a single package.
This commit is contained in:
parent
38fb93fd16
commit
ce68613438
1 changed files with 49 additions and 65 deletions
|
@ -3,8 +3,10 @@
|
|||
become: yes
|
||||
block:
|
||||
- name: Install apt packages
|
||||
apt: name={{ item }} state=latest update_cache=yes
|
||||
loop:
|
||||
apt:
|
||||
update_cache: yes
|
||||
state: latest
|
||||
name:
|
||||
- curl
|
||||
- exa
|
||||
- exuberant-ctags
|
||||
|
@ -22,14 +24,13 @@
|
|||
- youtube-dl
|
||||
|
||||
|
||||
|
||||
|
||||
- name: Set up macOS machine
|
||||
when: ansible_os_family == "Darwin"
|
||||
block:
|
||||
- name: Install homebrew packages
|
||||
homebrew: name={{ item }} state=latest
|
||||
loop:
|
||||
homebrew:
|
||||
state: latest
|
||||
name:
|
||||
- coreutils
|
||||
- ctags
|
||||
- curl
|
||||
|
@ -56,20 +57,3 @@
|
|||
- wget
|
||||
- youtube-dl
|
||||
|
||||
# - name: Tap into homebrew/cask-fonts
|
||||
# homebrew_tap: tap=homebrew/cask-fonts state=present
|
||||
|
||||
# - name: Install Mac apps with homebrew cask
|
||||
# homebrew_cask: name={{item}} state=present
|
||||
# loop:
|
||||
# - 1password
|
||||
# - cyberduck
|
||||
# - dropbox
|
||||
# - firefox
|
||||
# - font-source-code-pro
|
||||
# - google-chrome
|
||||
# - iterm2
|
||||
# - transmission
|
||||
# - vagrant
|
||||
# - virtualbox
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue