-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yml
122 lines (111 loc) · 3.11 KB
/
playbook.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
- name: Setup
hosts: localhost
tasks:
- name: Install fish
community.general.homebrew:
name: fish
- name: Set fish shell
become: true
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: /opt/homebrew/bin/fish
- name: Create fish directory
ansible.builtin.file:
mode: u=rwx,g=rx,o=rx
path: ~/.config/fish
state: directory
- name: Add Homebrew to PATH
ansible.builtin.lineinfile:
create: true
line: eval "$(/opt/homebrew/bin/brew shellenv)"
mode: u=rw,g=r,o=r
path: ~/.config/fish/config.fish
# Install
- name: Install Homebrew formula
community.general.homebrew:
name: "{{ item }}"
loop:
- act
- d2
- mise
- neovim
- tldr
- name: Install Homebrew cask
community.general.homebrew_cask:
name: "{{ item }}"
loop:
- arc
- docker
- jetbrains-toolbox
- obsidian
- raycast
- signal
- spotify
- name: Install Node.js
ansible.builtin.command: mise use --global node@20
register: node
changed_when: "'installed' in node.stderr"
- name: Install pnpm
ansible.builtin.command: mise use --global pnpm --yes
register: pnpm
changed_when: "'installed' in pnpm.stderr"
# Configure
- name: Tap to click
community.general.osx_defaults:
domain: com.apple.AppleMultitouchTrackpad
key: Clicking
type: int
value: 1
- name: Automatically hide and show the Dock
community.general.osx_defaults:
domain: com.apple.dock
key: autohide
type: bool
value: true
- name: Show suggested and recent apps in Dock
community.general.osx_defaults:
domain: com.apple.dock
key: show-recents
type: bool
value: false
- name: Show all filename extensions
community.general.osx_defaults:
domain: NSGlobalDomain
key: AppleShowAllExtensions
type: bool
value: true
- name: Show path bar
community.general.osx_defaults:
domain: com.apple.finder
key: ShowPathbar
type: bool
value: true
- name: Show battery percentage in the menu bar
community.general.osx_defaults:
domain: com.apple.controlcenter
host: currentHost
key: BatteryShowPercentage
type: bool
value: true
- name: Generate SSH key
community.crypto.openssh_keypair:
path: ~/.ssh/id_ed25519
type: ed25519
- name: Configure ~/.gitconfig
community.general.git_config:
name: "{{ item.name }}"
scope: global
value: "{{ item.value }}"
loop:
- name: user.name
value: "Bastien Sun"
- name: user.email
value: "43788700+bastiensun@users.noreply.github.com"
- name: core.editor
value: "nvim"
- name: gpg.format
value: "ssh"
- name: user.signingkey
value: "~/.ssh/id_ed25519.pub"
- name: commit.gpgsign
value: "true"