Define dotfiles location as variable

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

View File

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

View File

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