Compare commits
15 commits
main
...
ansible-al
| Author | SHA1 | Date | |
|---|---|---|---|
| d6bb7ae726 | |||
| 3b509c45d1 | |||
| 2c23fad3e8 | |||
| 6c6c7937c6 | |||
| 398c6f2d18 | |||
| 01312752fc | |||
| bc4b9f8089 | |||
| f7a29e3c1d | |||
| 65182a7c52 | |||
| 29e0b21a99 | |||
| b454868ca8 | |||
| 916086b743 | |||
| c664ca3b9d | |||
| ae514e9a07 | |||
| 74196601f6 |
111 changed files with 328 additions and 94 deletions
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
init: venv deps
|
|
||||||
|
|
||||||
venv: ./env/bin/pip
|
|
||||||
python3 -m venv env
|
|
||||||
|
|
||||||
deps: ./env/bin/ansible-playbook
|
|
||||||
./env/bin/pip install -r requirements.txt
|
|
||||||
|
|
||||||
freeze:
|
|
||||||
./env/bin/pip freeze > requirements.txt
|
|
||||||
16
Ansible/ansible.cfg
Normal file
16
Ansible/ansible.cfg
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
[defaults]
|
||||||
|
bin_ansible_callbacks = True
|
||||||
|
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
|
||||||
|
remote_user = eryn
|
||||||
|
roles_path = roles
|
||||||
|
stdout_callback = community.general.yaml
|
||||||
|
|
||||||
|
[connection]
|
||||||
|
pipelining = true
|
||||||
|
|
||||||
|
[ssh_connection]
|
||||||
|
ssh_args = -o ControlMaster=auto -o ControlPersist=60s
|
||||||
|
|
||||||
|
[vault]
|
||||||
|
username = ansible-infrastructure-vault
|
||||||
|
keyname = default
|
||||||
|
|
@ -1,53 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
vars:
|
|
||||||
repo: https://github.com/erynofwales/dotfiles.git
|
|
||||||
local_repo: ~/.dotfiles
|
|
||||||
dotfiles:
|
|
||||||
- Xdefaults
|
|
||||||
- emacs
|
|
||||||
- emacs.d
|
|
||||||
- env
|
|
||||||
- gdbinit
|
|
||||||
- gitconfig
|
|
||||||
- gitignore
|
|
||||||
- gvimrc
|
|
||||||
- hgrc
|
|
||||||
- indent.pro
|
|
||||||
- muttrc
|
|
||||||
- nethackrc
|
|
||||||
- profile
|
|
||||||
- rc
|
|
||||||
- screenrc
|
|
||||||
nvim_conifg: ~/.config/nvim
|
|
||||||
vim_bundles:
|
|
||||||
Vundle.vim: https://github.com/gmarik/Vundle.vim.git
|
|
||||||
tasks:
|
|
||||||
- name: Pull dotfiles
|
|
||||||
git: repo={{ repo }} dest={{ local_repo }}
|
|
||||||
|
|
||||||
- name: Link dotfiles
|
|
||||||
file: src={{ local_repo }}/{{ item }} dest=~/.{{ item }} state=link
|
|
||||||
with_items: "{{ dotfiles }}"
|
|
||||||
|
|
||||||
- name: Link ~/bin
|
|
||||||
file: src={{ local_repo }}/bin dest=~/bin state=link
|
|
||||||
|
|
||||||
# Don't show last login when I open a terminal
|
|
||||||
- name: Touch .hushlogin
|
|
||||||
file: path=~/.hushlogin state=touch
|
|
||||||
|
|
||||||
# Setup neovim
|
|
||||||
- name: Create ~/.config
|
|
||||||
file: path=~/.config state=directory
|
|
||||||
- name: Symlink vim dir for neovim
|
|
||||||
file: src={{ local_repo }}/vim dest={{ nvim_config }}
|
|
||||||
- name: Symlink vimrc for neovim
|
|
||||||
file: src={{ local_repo }}/vimrc dest={{ nvim_config }}/init.vim
|
|
||||||
|
|
||||||
# Setup vim bundles
|
|
||||||
- name: Get Vim bundles
|
|
||||||
git: repo={{ item[1] }} dest={{ local_repo }}/vim/bundle/{{ item[0] }}
|
|
||||||
with_items: "{{ vim_bundles }}"
|
|
||||||
- name: Install bundles registered in vim
|
|
||||||
command: vim +PluginInstall +qall
|
|
||||||
7
Ansible/local.yml
Normal file
7
Ansible/local.yml
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: Local
|
||||||
|
hosts: localhost
|
||||||
|
tasks:
|
||||||
|
- name: Set up dotfiles
|
||||||
|
ansible.builtin.include_role:
|
||||||
|
name: dotfiles
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
---
|
|
||||||
- hosts: localhost
|
|
||||||
vars:
|
|
||||||
dotfiles: ~/.dotfiles
|
|
||||||
packages: [mutt, offlineimap, urlview, w3m]
|
|
||||||
tasks:
|
|
||||||
- name: "Install packages: {{ packages|join(', ') }}"
|
|
||||||
homebrew: name={{ packages }} state=present
|
|
||||||
|
|
||||||
- name: Link mutt config files
|
|
||||||
file: src={{ dotfiles }}/{{ item }} dest=~/.{{ item }} state=link
|
|
||||||
with_items: [muttrc, mutt]
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
ansible==8.7.0
|
|
||||||
ansible-core==2.15.12
|
|
||||||
cffi==1.17.0
|
|
||||||
cryptography==43.0.0
|
|
||||||
importlib-resources==5.0.7
|
|
||||||
Jinja2==3.1.4
|
|
||||||
MarkupSafe==2.1.5
|
|
||||||
packaging==24.1
|
|
||||||
passlib==1.7.4
|
|
||||||
pycparser==2.22
|
|
||||||
PyYAML==6.0.2
|
|
||||||
resolvelib==1.0.1
|
|
||||||
|
|
@ -19,9 +19,9 @@ set timeout=300
|
||||||
set imap_keepalive=300
|
set imap_keepalive=300
|
||||||
|
|
||||||
# Caching
|
# Caching
|
||||||
set header_cache="~/.mutt/cache/headers"
|
set header_cache="~/.local/state/mutt/cache/headers"
|
||||||
set message_cachedir="~/.mutt/cache/bodies"
|
set message_cachedir="~/.local/state/mutt/cache/bodies"
|
||||||
set certificate_file="~/.mutt/certificates"
|
set certificate_file="~/.local/state/mutt/certificates"
|
||||||
|
|
||||||
set use_from=yes
|
set use_from=yes
|
||||||
set envelope_from=yes
|
set envelope_from=yes
|
||||||
|
|
@ -50,14 +50,14 @@ hdr_order Date: From: To: Cc: Subject:
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
set reverse_alias=yes
|
set reverse_alias=yes
|
||||||
set alias_file="~/.mutt/aliases"
|
set alias_file="~/.config/mutt/aliases"
|
||||||
|
|
||||||
# Composing and Sending
|
# Composing and Sending
|
||||||
set edit_headers=yes
|
set edit_headers=yes
|
||||||
set include=yes
|
set include=yes
|
||||||
|
|
||||||
# HTML email :(
|
# HTML email :(
|
||||||
set mailcap_path="~/.mutt/mailcap"
|
set mailcap_path="~/.config/mutt/mailcap"
|
||||||
auto_view text/html
|
auto_view text/html
|
||||||
alternative_order text/html text/plain text/enriched
|
alternative_order text/html text/plain text/enriched
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
function init_site_environments
|
||||||
|
{
|
||||||
|
export ERYNWELLS_ME_SITE="$HOME/Developer/erynwells.me"
|
||||||
|
}
|
||||||
|
|
||||||
|
init_site_environments "$@"
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
function init_website_environments
|
||||||
|
{
|
||||||
|
export ERYNWELLS_ME_SITE="$HOME/Developer/erynwells.me"
|
||||||
|
}
|
||||||
|
|
||||||
|
init_website_environments "$@"
|
||||||
15
Ansible/roles/dotfiles/files/zsh/functions/weeknotes
Normal file
15
Ansible/roles/dotfiles/files/zsh/functions/weeknotes
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
autoload init_website_environment
|
||||||
|
|
||||||
|
function weeknotes
|
||||||
|
{
|
||||||
|
init_website_environment
|
||||||
|
|
||||||
|
YEAR=`date '+%Y'`
|
||||||
|
WEEK_NUMBER=`date '+%V'`
|
||||||
|
PAGE_PATH=blog/${YEAR}/weeknotes-${YEAR}w${WEEK_NUMBER}.md
|
||||||
|
UPCOMING_SUNDAY=`${ERYNWELLS_ME_SITE}/scripts/next_sunday.py`
|
||||||
|
}
|
||||||
|
|
||||||
|
weeknotes "$@"
|
||||||
|
|
@ -9,7 +9,9 @@ function init-env-fpath
|
||||||
{
|
{
|
||||||
local -r fpath_candidates=( \
|
local -r fpath_candidates=( \
|
||||||
"$HOME/.zsh/${SYS}-functions" \
|
"$HOME/.zsh/${SYS}-functions" \
|
||||||
"$HOME/.zsh/func" \
|
"$HOME/.zsh/init-env-functions" \
|
||||||
|
"$HOME/.zsh/init-rc-functions" \
|
||||||
|
"$HOME/.zsh/functions" \
|
||||||
)
|
)
|
||||||
|
|
||||||
# Process the array in reverse order (`Oa` means "descending index order",
|
# Process the array in reverse order (`Oa` means "descending index order",
|
||||||
4
Ansible/roles/dotfiles/handlers/main.yml
Normal file
4
Ansible/roles/dotfiles/handlers/main.yml
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
---
|
||||||
|
- name: Rediscover package manager
|
||||||
|
ansible.builtin.setup:
|
||||||
|
gather_subset: pkg_mgr
|
||||||
3
Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml
Normal file
3
Ansible/roles/dotfiles/tasks/darwin/bootstrap.yml
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
---
|
||||||
|
- name: (macOS) Configure homebrew
|
||||||
|
ansible.builtin.include_tasks: homebrew.yml
|
||||||
37
Ansible/roles/dotfiles/tasks/darwin/homebrew.yml
Normal file
37
Ansible/roles/dotfiles/tasks/darwin/homebrew.yml
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
- name: (macOS | homebrew) Does the brew command exist?
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /opt/homebrew/bin/brew
|
||||||
|
register: _dotfiles_homebrew_brew
|
||||||
|
|
||||||
|
- name: (macOS | homebrew) Install Homebrew
|
||||||
|
when: not _dotfiles_homebrew_brew.stat.exists
|
||||||
|
block:
|
||||||
|
- name: (macOS | homebrew) Create temporary file for install script
|
||||||
|
ansible.builtin.tempfile:
|
||||||
|
state: file
|
||||||
|
prefix: homebrew-install
|
||||||
|
register: _dotfiles_homebrew_install_script
|
||||||
|
|
||||||
|
- name: (macOS | homebrew) Set up homebrew
|
||||||
|
block:
|
||||||
|
- name: (macOS | homebrew) Fetch install script
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
|
||||||
|
dest: "{{ _dotfiles_homebrew_install_script.path }}"
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: (macOS | homebrew) Run install script
|
||||||
|
ansible.builtin.command:
|
||||||
|
cmd: bash {{ _dotfiles_homebrew_install_script.path }}
|
||||||
|
environment:
|
||||||
|
NONINTERACTIVE: 1
|
||||||
|
|
||||||
|
- name: (macOS | homebrew) Gather package manager facts
|
||||||
|
ansible.builtin.setup:
|
||||||
|
gather_subset: pkg_mgr
|
||||||
|
always:
|
||||||
|
- name: (macOS | homebrew) Remove temporary install script
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: "{{ _dotfiles_homebrew_install_script.path }}"
|
||||||
|
state: absent
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue