-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.yml
55 lines (55 loc) · 1.39 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
- name: Install development setup
hosts: localhost
connection: local
module_defaults:
community.general.homebrew:
path: /opt/homebrew/bin
tasks:
- name: Set common roles
ansible.builtin.set_fact:
use_sudo: "{{ 'false' if ansible_system == 'Darwin' else 'true' }}"
components:
- llvm
- zsh
- parallel
- tmux
- environment
- kitty
- pyenv
- pre-commit
- npm
- neovim
- direnv
- jq
- fd
- fzf
- ripgrep
- aws
- git
- watson
- rust
components_macos:
- yabai
- spacebar
- skhd
- name: Determine whether to use sudo
ansible.builtin.set_fact:
use_sudo: "{{ 'no' if ansible_system == 'Darwin' else 'yes' }}"
- name: Install stow
ansible.builtin.package:
state: present
name: stow
become: "{{ use_sudo }}"
- name: Run common roles
ansible.builtin.include_role:
name: "{{ component }}"
loop_control:
loop_var: component
with_items: "{{ components }}"
- name: Run MacOS roles
ansible.builtin.include_role:
name: "{{ component }}"
loop_control:
loop_var: component
with_items: "{{ components_macos }}"
when: ansible_system == 'Darwin'