Define dotfiles location as variable

This commit is contained in:
Michael Mandl 2020-05-31 12:52:20 +02:00
parent 43b4c129ed
commit 049a97b82e
3 changed files with 7 additions and 6 deletions

View file

@ -10,15 +10,15 @@
- name: clone dotfiles
become_user: "{{ account.name }}"
git:
repo: https://github.com/mandlm/dotfiles.git
dest: "{{ account.home }}/.dotfiles"
repo: git@github.com:mandlm/dotfiles.git
dest: "{{ dotfiles }}"
accept_hostkey: yes
update: no
- name: install zsh config
become_user: "{{ account.name }}"
shell:
chdir: "{{ account.home }}/.dotfiles/zsh"
chdir: "{{ dotfiles }}/zsh"
cmd: ./install.sh
creates: "{{ account.home }}/.zshrc"
@ -33,14 +33,14 @@
- name: install tmux config
become_user: "{{ account.name }}"
shell:
chdir: "{{ account.home }}/.dotfiles/tmux"
chdir: "{{ dotfiles }}/tmux"
cmd: ./install.sh
creates: "{{ account.home }}/.tmux.conf"
- name: install git config
become_user: "{{ account.name }}"
shell:
chdir: "{{ account.home }}/.dotfiles/git"
chdir: "{{ dotfiles }}/git"
cmd: ./install.sh
creates: "{{ account.home }}/.gitconfig"

View file

@ -21,7 +21,7 @@
- name: install nvim config
become_user: "{{ account.name }}"
shell:
chdir: "{{ account.home }}/.dotfiles/nvim"
chdir: "{{ dotfiles }}/nvim"
cmd: ./install.sh
creates: "{{ account.home }}/.config/nvim/init.vim"

View file

@ -3,6 +3,7 @@
vars:
username: mandlm
password: $6$hfdjshdfkajdsh$DRgmUOQfm9DnvSv.l.WuQJpextzBpX5BCbSncXTts5dHazvKRxj8qUYAjju2/AGZqKOt8PTLC7w9yRR68ZHCG1
dotfiles: "~/.dotfiles"
become: yes
gather_facts: no
roles: