|
|
@ -1,35 +1,47 @@
|
|
|
|
- hosts: all
|
|
|
|
- name: Set up macOS
|
|
|
|
|
|
|
|
hosts: all
|
|
|
|
tasks:
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
|
|
|
|
- file: path=~/Library/KeyBindings state=directory
|
|
|
|
- name: Create ~/Library directories
|
|
|
|
|
|
|
|
ansible.builtin.file:
|
|
|
|
|
|
|
|
path: ~/Library/{{ item }}
|
|
|
|
|
|
|
|
state: directory
|
|
|
|
|
|
|
|
mode: '0755'
|
|
|
|
|
|
|
|
loop:
|
|
|
|
|
|
|
|
- Colors
|
|
|
|
|
|
|
|
- Dictionaries
|
|
|
|
|
|
|
|
- KeyBindings
|
|
|
|
|
|
|
|
|
|
|
|
- name: Symlink Emacs-style keybindings for OS X
|
|
|
|
- name: Symlink Emacs-style keybindings for OS X
|
|
|
|
file:
|
|
|
|
ansible.builtin.file:
|
|
|
|
src: ~/.dotfiles/macos/DefaultKeyBinding.dict
|
|
|
|
src: ~/.dotfiles/macos/DefaultKeyBinding.dict
|
|
|
|
dest: ~/Library/KeyBindings/DefaultKeyBinding.dict
|
|
|
|
dest: ~/Library/KeyBindings/DefaultKeyBinding.dict
|
|
|
|
state: link
|
|
|
|
state: link
|
|
|
|
|
|
|
|
|
|
|
|
- file: path=~/Library/Colors state=directory
|
|
|
|
- name: Symlink OS X colors palettes
|
|
|
|
- name: symlink OS X colors palettes
|
|
|
|
ansible.builtin.file:
|
|
|
|
file: src={{ item }} dest=~/Library/Colors/{{ item | basename }} state=link
|
|
|
|
src: "{{ item }}"
|
|
|
|
|
|
|
|
dest: ~/Library/Colors/{{ item | basename }}
|
|
|
|
|
|
|
|
state: link
|
|
|
|
with_fileglob: ~/.dotfiles/macos/colors/*
|
|
|
|
with_fileglob: ~/.dotfiles/macos/colors/*
|
|
|
|
|
|
|
|
|
|
|
|
- file: path=~/Library/Dictionaries state=directory
|
|
|
|
|
|
|
|
- name: Install Webster's 1913 dictionary
|
|
|
|
- name: Install Webster's 1913 dictionary
|
|
|
|
copy:
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: ~/.dotfiles/macos/websters-1913.dictionary/
|
|
|
|
src: ~/.dotfiles/macos/websters-1913.dictionary/
|
|
|
|
dest: ~/Library/Dictionaries/websters-1913.dictionary
|
|
|
|
dest: ~/Library/Dictionaries/websters-1913.dictionary
|
|
|
|
|
|
|
|
mode: '644'
|
|
|
|
|
|
|
|
|
|
|
|
- name: Enable Touch ID for sudo
|
|
|
|
- name: Enable Touch ID for sudo
|
|
|
|
become: yes
|
|
|
|
become: true
|
|
|
|
lineinfile:
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/pam.d/sudo
|
|
|
|
path: /etc/pam.d/sudo
|
|
|
|
insertafter: '^auth\s+sufficient'
|
|
|
|
insertafter: '^auth\s+sufficient'
|
|
|
|
regexp: '^auth\s+sufficient\s+pam_tid.so$'
|
|
|
|
regexp: '^auth\s+sufficient\s+pam_tid.so$'
|
|
|
|
line: "auth\tsufficient\tpam_tid.so"
|
|
|
|
line: "auth\tsufficient\tpam_tid.so"
|
|
|
|
|
|
|
|
|
|
|
|
- name: Enable Touch ID for sudo in tmux
|
|
|
|
- name: Enable Touch ID for sudo in tmux
|
|
|
|
become: yes
|
|
|
|
become: true
|
|
|
|
lineinfile:
|
|
|
|
ansible.builtin.lineinfile:
|
|
|
|
path: /etc/pam.d/sudo
|
|
|
|
path: /etc/pam.d/sudo
|
|
|
|
insertbefore: '^auth\tsufficient\tpam_tid.so'
|
|
|
|
insertbefore: '^auth\tsufficient\tpam_tid.so'
|
|
|
|
regexp: '^auth\s+optional\s+.*pam_reattach.so$'
|
|
|
|
regexp: '^auth\s+optional\s+.*pam_reattach.so$'
|
|
|
@ -46,9 +58,13 @@
|
|
|
|
ansible.builtin.copy:
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: macos/tmux-256color
|
|
|
|
src: macos/tmux-256color
|
|
|
|
dest: "{{ tempfile.path }}"
|
|
|
|
dest: "{{ tempfile.path }}"
|
|
|
|
|
|
|
|
mode: '644'
|
|
|
|
- name: Install terminfo
|
|
|
|
- name: Install terminfo
|
|
|
|
command: /usr/bin/tic -x {{ tempfile.path }}
|
|
|
|
ansible.builtin.command: /usr/bin/tic -x {{ tempfile.path }}
|
|
|
|
|
|
|
|
changed_when: true
|
|
|
|
- name: Delete temporary file
|
|
|
|
- name: Delete temporary file
|
|
|
|
ansible.builtin.file:
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ tempfile.path }}"
|
|
|
|
path: "{{ tempfile.path }}"
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# vim: ft=yaml.ansible
|
|
|
|