From 049a97b82e73e74a04fe0bb374b2e83b1f646567 Mon Sep 17 00:00:00 2001 From: Michael Mandl Date: Sun, 31 May 2020 12:52:20 +0200 Subject: [PATCH] Define dotfiles location as variable --- roles/misc/tasks/main.yaml | 10 +++++----- roles/neovim/tasks/main.yaml | 2 +- wsl-debian.yaml | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/roles/misc/tasks/main.yaml b/roles/misc/tasks/main.yaml index fa9e478..eff73cb 100644 --- a/roles/misc/tasks/main.yaml +++ b/roles/misc/tasks/main.yaml @@ -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" diff --git a/roles/neovim/tasks/main.yaml b/roles/neovim/tasks/main.yaml index ce40be4..792732a 100644 --- a/roles/neovim/tasks/main.yaml +++ b/roles/neovim/tasks/main.yaml @@ -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" diff --git a/wsl-debian.yaml b/wsl-debian.yaml index ac8edad..b6e69e8 100644 --- a/wsl-debian.yaml +++ b/wsl-debian.yaml @@ -3,6 +3,7 @@ vars: username: mandlm password: $6$hfdjshdfkajdsh$DRgmUOQfm9DnvSv.l.WuQJpextzBpX5BCbSncXTts5dHazvKRxj8qUYAjju2/AGZqKOt8PTLC7w9yRR68ZHCG1 + dotfiles: "~/.dotfiles" become: yes gather_facts: no roles: