Use blocks to organize package installations

This commit is contained in:
Fernando Schauenburg 2019-11-16 12:18:32 +00:00
parent b9fb127fdf
commit 41f5acd61b

View file

@ -1,7 +1,9 @@
---
- name: Install apt packages (Debian)
- name: Set up Debian machine
when: ansible_os_family == "Debian"
become: yes
block:
- name: Install apt packages
apt: name={{ item }} state=latest update_cache=yes
loop:
- curl
@ -14,8 +16,10 @@
- stow
- tree
- name: Install homebrew packages (macOS)
- name: Set up macOS machine
when: ansible_os_family == "Darwin"
block:
- name: Install homebrew packages
homebrew: name={{ item }} state=latest
loop:
- coreutils