Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/check-playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
run: |
pip3 install jmespath ansible
ansible-galaxy install -r requirements.yml
- name: Update homebrew
run: |
brew update
brew --version
- name: Check playbook syntax
run: |
ansible-playbook --syntax-check playbook.yml
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

This repository is used to provision my environment using Ansible playbooks.

`dotfiles` are stored in the MinnSoe/dotfiles repository.

Please ensure that the playbook is run with SUDO prompt:
Please ensure that the playbook is run with `sudo` prompt:
`ansible-playbook playbook.yml -K`

## License

Copyright (c) 2018 Minn Soe under The MIT License (MIT).
A copy of the license is provided in the [LICENSE](./LICENSE) file.
Copyright © 2018–present, Minn Soe

This project is MIT licensed. A full copy of the license is provided in the
[LICENSE](./LICENSE) file.
4 changes: 0 additions & 4 deletions playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
hosts: localhost
connection: local

vars:
use_dotfiles: true

roles:
- role: system-utils
tags: [system]
Expand Down Expand Up @@ -39,4 +36,3 @@
tags: [productivity, macos]
- role: hardware
tags: [hardware, drivers, macos]

5 changes: 2 additions & 3 deletions requirements.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

---
collections:
- name: https://github.com/ansible-collections/community.general
type: git
version: 4c379bd3b2147710c3e7a1d900cddf47a6b7cd42
- name: community.general

roles:
- name: geerlingguy.mas
13 changes: 0 additions & 13 deletions roles/dotfiles/tasks/main.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/dotfiles/vars/main.yml

This file was deleted.

49 changes: 16 additions & 33 deletions roles/editors/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,24 @@
---
- name: Tap into d12frosted/emacs-plus
homebrew_tap: tap=d12frosted/emacs-plus state=present
when: ansible_os_family|lower == 'darwin'

- name: Tap into homebrew/cask-fonts
homebrew_tap:
name: homebrew/cask-fonts
state: present
when: ansible_os_family|lower == 'darwin'

- name: Install emacs
homebrew: name=emacs-plus state=present
community.general.homebrew_cask:
name: railwaycat/emacsmacport/emacs-mac
state: latest
when: ansible_os_family|lower == 'darwin'

- name: Setup emacs startup daemon
shell: brew services start d12frosted/emacs-plus/emacs-plus
- name: Install editor fonts
community.general.homebrew_cask:
name:
- homebrew/cask-fonts/font-fira-mono-nerd-font
state: latest
when: ansible_os_family|lower == 'darwin'

- name: Install spacemacs
git:
repo: 'https://github.com/syl20bnr/spacemacs'
dest: ~/.emacs.d
version: develop

- name: Install spacemacs configuration
import_role:
name: dotfiles
vars:
app: spacemacs

- name: Install editor fonts
homebrew_cask:
name: "{{ item }}"
state: present
with_items:
- font-source-code-pro
- font-fira-mono-nerd-font
- name: Install doom emacs
ansible.builtin.git:
repo: "https://github.com/hlissner/doom-emacs"
dest: "${HOME}/.emacs.d"
depth: 1

- name: Install Visual Studio Code
homebrew_cask: name=visual-studio-code state=present
community.general.homebrew_cask:
name: visual-studio-code
state: latest
6 changes: 0 additions & 6 deletions roles/productivity/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,3 @@
when: ansible_os_family|lower == 'darwin'
tags:
- mas

- name: Install alacritty dotfiles configuration
import_role:
name: dotfiles
vars:
app: alacritty
12 changes: 0 additions & 12 deletions roles/shell-utils/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,7 @@
# load/unload environment variables based on $PWD
- default: 'direnv'

- name: Link dotfiles starship configuration
include_role:
name: dotfiles
vars:
app: starship

- name: Install tmux plugin manager
git:
repo: 'https://github.com/tmux-plugins/tpm'
dest: '~/.tmux/plugins/tpm'

- name: Link dotfiles tmux configuration
include_role:
name: dotfiles
vars:
app: tmux
9 changes: 2 additions & 7 deletions roles/zsh/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---

zsh_user: '{{ ansible_user_id }}'
zsh_user_home: '{{ ansible_env.HOME }}'
zsh_homebrew_path: '/usr/local/bin/zsh'
zsh_antigen_path: '{{ ansible_env.HOME }}/.zsh/antigen'
zsh_should_use_dotfiles: false
zsh_dotfiles_location: '{{ ansible_env.HOME }}/dotfiles'
zsh_homebrew_path: "/usr/local/bin/zsh"
zsh_zinit_path: "{{ ansible_env.HOME }}/.zinit/bin"
14 changes: 0 additions & 14 deletions roles/zsh/tasks/configure.yml

This file was deleted.

32 changes: 0 additions & 32 deletions roles/zsh/tasks/install.yml

This file was deleted.

32 changes: 24 additions & 8 deletions roles/zsh/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
---
- import_tasks: install.yml
tags:
- zsh
- install

- import_tasks: configure.yml
tags:
- configure
- name: Ensure zsh and dependencies are present
ansible.builtin.package:
name:
- zsh
- git
state: present

- name: Set zsh path to system zsh
ansible.builtin.command: which zsh
register: zsh_path

- name: Set zsh path to homebrew zsh
ansible.builtin.set_fact: zsh_path="{{ zsh_homebrew_path }}"
when: ansible_os_family|lower == "darwin"

- name: Set zsh as default user shell for "{{ ansible_user_id }}"
ansible.builtin.user:
name: "{{ ansible_user_id }}"
shell: "{{ zsh_path }}"

- name: Clone zinit into "{{ zsh_zinit_path }}"
ansible.builtin.git:
repo: https://github.com/zdharma/zinit.git
dest: "{{ zsh_zinit_path }}"