1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 13:01:40 +01:00

ansible: cleanup setup playbook

This commit is contained in:
bretello 2022-02-05 13:44:05 +01:00
parent 41d001a5ce
commit 73ef8d928a
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -27,11 +27,23 @@
version: master
when: local_development is not defined
- name: antibody
- name: directories
file:
dest: '{{ item }}'
state: directory
mode: 0700
loop: '{{ directories }}'
vars:
directories:
- '$HOME/bin'
- '$HOME/projects'
- '$HOME/git'
- name: antibody # TODO: antibody is available on apt(debian)/brew/pacman
shell: |
set -o pipefail
curl -sfL https://git.io/antibody | sh -s - -b /usr/local/bin
antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
set -euo pipefail
curl -sfL https://git.io/antibody | sh -s - -b $HOME/bin/
/opt/homebrew/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
args:
executable: /bin/bash
creates: /usr/local/bin/antibody
@ -42,11 +54,12 @@
shell: /usr/bin/zsh
- name: zsh config
shell: |
echo "export DOTFILES={{ DOTFILES }}" >> "$HOME/.zshrc"
echo 'source $DOTFILES/brethil_dotfile.sh' >> "$HOME/.zshrc"
args:
creates: '~{{ ansible_user }}/.zshrc'
blockinfile:
path: $HOME/.zshrc
marker: "# brethil dotfiles"
block: |
export DOTFILES={{ DOTFILES }}
source $DOTFILES/brethil_dotfile.sh
- name: dotfiles symlink
file:
@ -93,8 +106,6 @@
copy:
src: ../../gitignore
dest: ~/.gitignore
owner: root
group: root
mode: '0600'
backup: yes
@ -110,15 +121,3 @@
args:
executable: /bin/bash
when: fix_annoyances is true
- name: directories
file:
dest: '{{ item }}'
state: directory
mode: 0700
loop: '{{ directories }}'
vars:
directories:
- '$HOME/bin'
- '$HOME/projects'
- '$HOME/git'