1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-24 12:31:31 +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 version: master
when: local_development is not defined 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: | shell: |
set -o pipefail set -euo pipefail
curl -sfL https://git.io/antibody | sh -s - -b /usr/local/bin curl -sfL https://git.io/antibody | sh -s - -b $HOME/bin/
antibody bundle "{{ DOTFILES }}/antibody_plugins.txt" /opt/homebrew/bin/antibody bundle "{{ DOTFILES }}/antibody_plugins.txt"
args: args:
executable: /bin/bash executable: /bin/bash
creates: /usr/local/bin/antibody creates: /usr/local/bin/antibody
@ -42,11 +54,12 @@
shell: /usr/bin/zsh shell: /usr/bin/zsh
- name: zsh config - name: zsh config
shell: | blockinfile:
echo "export DOTFILES={{ DOTFILES }}" >> "$HOME/.zshrc" path: $HOME/.zshrc
echo 'source $DOTFILES/brethil_dotfile.sh' >> "$HOME/.zshrc" marker: "# brethil dotfiles"
args: block: |
creates: '~{{ ansible_user }}/.zshrc' export DOTFILES={{ DOTFILES }}
source $DOTFILES/brethil_dotfile.sh
- name: dotfiles symlink - name: dotfiles symlink
file: file:
@ -93,8 +106,6 @@
copy: copy:
src: ../../gitignore src: ../../gitignore
dest: ~/.gitignore dest: ~/.gitignore
owner: root
group: root
mode: '0600' mode: '0600'
backup: yes backup: yes
@ -110,15 +121,3 @@
args: args:
executable: /bin/bash executable: /bin/bash
when: fix_annoyances is true when: fix_annoyances is true
- name: directories
file:
dest: '{{ item }}'
state: directory
mode: 0700
loop: '{{ directories }}'
vars:
directories:
- '$HOME/bin'
- '$HOME/projects'
- '$HOME/git'