mac-setup/main.yml

31 lines
706 B
YAML

---
- hosts: self
user: jgeerling
connection: local
vars_files:
- vars/main.yml
roles:
- geerlingguy.homebrew
tasks:
- name: Ensure Ansible downloads directory exists.
file:
path: "{{ downloads }}"
state: directory
- include: tasks/dotfiles.yml
- include: tasks/preferences.yml
- name: Get list of apps installed with cask.
command: brew cask list
register: homebrew_cask_list
changed_when: false
- name: Install apps via `brew cask`.
command: >
brew cask install {{ item }} --appdir={{ homebrew_cask_appdir }}
with_items: homebrew_cask_apps
when: "'{{ item }}' not in homebrew_cask_list.stdout"