Update to macos install
This commit is contained in:
parent
f862c981f7
commit
e3aaee336c
|
@ -100,7 +100,7 @@ gnome_extensions:
|
|||
- freon@UshakovVasilii_Github.yahoo.com
|
||||
|
||||
macos:
|
||||
hostname: "maximum"
|
||||
hostname: "maximus"
|
||||
dock_apps:
|
||||
- /System/Applications/Calendar.app
|
||||
- /Applications/Todoist.app
|
||||
|
@ -114,6 +114,7 @@ macos:
|
|||
- /Applications/WhatsApp.app
|
||||
- /Applications/Spotify.app
|
||||
homebrew_packages:
|
||||
- defaultbrowser
|
||||
- mas
|
||||
- tree
|
||||
- iterm2
|
||||
|
@ -139,11 +140,14 @@ macos:
|
|||
- the_silver_searcher
|
||||
- jq
|
||||
- vim
|
||||
- rbw
|
||||
- wget
|
||||
- direnv
|
||||
- antidote
|
||||
- gnupg
|
||||
- sqlite
|
||||
- pinentry-mac
|
||||
- gh
|
||||
mas_remove:
|
||||
# GarageBand
|
||||
- 682658836
|
||||
|
|
|
@ -4,5 +4,6 @@
|
|||
roles:
|
||||
- { role: macos_01_hostname }
|
||||
- { role: macos_02_packages }
|
||||
- { role: macos_03_tweaks }
|
||||
- { role: macos_03_user }
|
||||
- { role: macos_04_tweaks }
|
||||
|
||||
|
|
|
@ -26,24 +26,11 @@
|
|||
validate: /usr/sbin/visudo -cf %s
|
||||
become: true
|
||||
|
||||
- name: Configure rbw
|
||||
ansible.builtin.file:
|
||||
path: ~/.config/rbw
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: true
|
||||
become_user: "{{ user.name }}"
|
||||
|
||||
- name: Copy rbw-config.json
|
||||
ansible.builtin.copy:
|
||||
src: rbw-config.json
|
||||
dest: ~/.config/rbw/config.json
|
||||
mode: '0644'
|
||||
become: true
|
||||
become_user: "{{ user.name }}"
|
||||
|
||||
- name: Configure pinentry for gnome3
|
||||
ansible.builtin.lineinfile:
|
||||
path: ~/.gnupg/gpg-agent.conf
|
||||
line: "pinentry-program /usr/bin/pinentry-gnome3"
|
||||
create: yes
|
||||
|
||||
- name: Install Bitwarden CLI settings
|
||||
ansible.builtin.import_tasks: rbw.yml
|
17
roles/07_user/tasks/rbw.yml
Normal file
17
roles/07_user/tasks/rbw.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
|
||||
- name: Configure rbw
|
||||
ansible.builtin.file:
|
||||
path: "{{ '~/Library/Application Support/rbw' if ansible_facts['os_family'] == 'Darwin' else '~/.config/rbw' }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
become: true
|
||||
become_user: "{{ user.name }}"
|
||||
|
||||
- name: Copy rbw-config.json
|
||||
ansible.builtin.copy:
|
||||
src: rbw-config.json
|
||||
dest: "{{ '~/Library/Application Support/rbw' if ansible_facts['os_family'] == 'Darwin' else '~/.config/rbw' }}/config.json"
|
||||
mode: '0644'
|
||||
become: true
|
||||
become_user: "{{ user.name }}"
|
|
@ -25,3 +25,9 @@
|
|||
|
||||
- name: Setup a wallpaper
|
||||
ansible.builtin.import_tasks: wallpaper.yml
|
||||
|
||||
- name: Configure gpg-agent pinentry
|
||||
ansible.builtin.lineinfile:
|
||||
path: ~/.gnupg/gpg-agent.conf
|
||||
line: "pinentry-program /usr/bin/pinentry-gnome3"
|
||||
create: yes
|
12
roles/macos_03_user/tasks/main.yml
Normal file
12
roles/macos_03_user/tasks/main.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
|
||||
- name: Install Bitwarden CLI settings
|
||||
ansible.builtin.include_role:
|
||||
name: 07_user
|
||||
tasks_from: rbw
|
||||
|
||||
- name: Configure gpg-agent pinentry
|
||||
ansible.builtin.lineinfile:
|
||||
path: ~/.gnupg/gpg-agent.conf
|
||||
line: "pinentry-program /usr/local/bin/pinentry-mac"
|
||||
create: yes
|
|
@ -23,9 +23,6 @@
|
|||
value: false
|
||||
state: present
|
||||
|
||||
- name: Setup dock apps
|
||||
community.general.osx_defaults:
|
||||
|
||||
- name: Remove all apps from dock
|
||||
community.general.osx_defaults:
|
||||
domain: com.apple.dock
|
||||
|
@ -40,7 +37,7 @@
|
|||
key: persistent-apps
|
||||
type: array
|
||||
array_add: true
|
||||
value: ['{{ item }}']
|
||||
value: ['<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>{{ item }}</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>']
|
||||
state: present
|
||||
with_items: "{{ macos.dock_apps }}"
|
||||
|
||||
|
@ -123,3 +120,7 @@
|
|||
- name: Restart SystemUIServer
|
||||
ansible.builtin.shell: killall SystemUIServer
|
||||
changed_when: false
|
||||
|
||||
- name: Set Firefox as default browser
|
||||
ansible.builtin.shell: defaultbrowser firefox
|
||||
|
|
@ -9,7 +9,7 @@ echo "--- Symlinking dotfiles"
|
|||
stow git ruby sqlite tmux vim zsh haskell emacs ssh
|
||||
|
||||
echo "--- Install Vim plugins"
|
||||
vim --clean '+source ~/.vimrc' +PluginInstall +qall
|
||||
vim -es -u ~/.vimrc +PluginInstall +qall
|
||||
|
||||
echo "--- All done!"
|
||||
echo "That's all. Please logout of this terminal and login again to apply all changes."
|
|
@ -1,7 +1,18 @@
|
|||
#!/usr/bin/env -S bash -i
|
||||
|
||||
copy_to_clipboard() {
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
pbcopy
|
||||
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
xclip -selection clipboard
|
||||
else
|
||||
echo "Unsupported operating system"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
echo "--- Grabbing GPG Passpharse from Bitwarden to clipboard"
|
||||
rbw get "GPG Passphrase" | xclip -selection clipboard
|
||||
rbw get "GPG Passphrase" | copy_to_clipboard
|
||||
|
||||
echo "--- Importing private/public key"
|
||||
rbw get "GPG Private/Pub Key (Ariejan)" | gpg --import
|
||||
|
|
Loading…
Reference in New Issue
Block a user