diff --git a/README.md b/README.md index e0d9bcd..01b1b33 100644 --- a/README.md +++ b/README.md @@ -45,9 +45,11 @@ enabled. By default, sshd is configured but not enabled. ## Dotfiles Ansible expects that the user wishes to clone dotfiles via the git repository -specified via the `dotfiles.url` variable and install them with [rcm][5]. If -this is not the case, removing the `dotfiles` variable will cause the relevant -tasks to be skipped. +specified via the `dotfiles.url` variable and install them with [rcm][5]. The +destination to clone the repository to is defined by the `dotfiles.destination` +variable. This is relative the user's home directory. + +These tasks will be skipped if the `dotfiles` variable is not defined. ## Tagging diff --git a/group_vars/all b/group_vars/all index 011162b..3e18a0a 100644 --- a/group_vars/all +++ b/group_vars/all @@ -10,6 +10,7 @@ hostname: nous dotfiles: url: git@github.com:pigmonkey/dotfiles.git + destination: projects/dotfiles rcup_flags: -fx README.md aur: diff --git a/roles/dotfiles/tasks/main.yml b/roles/dotfiles/tasks/main.yml index efc7de3..7be9ba7 100644 --- a/roles/dotfiles/tasks/main.yml +++ b/roles/dotfiles/tasks/main.yml @@ -6,13 +6,13 @@ - aur - name: Clone user dotfiles - git: repo={{ dotfiles.url }} dest=/home/{{ user.name }}/.dotfiles accept_hostkey=yes update=no + git: repo={{ dotfiles.url }} dest=/home/{{ user.name }}/{{ dotfiles.destination }} accept_hostkey=yes update=no when: dotfiles is defined become: yes become_user: "{{ user.name }}" - name: Install user dotfiles - command: rcup {{ dotfiles.rcup_flags }} + command: rcup -d /home/{{ user.name}}/{{ dotfiles.destination}} {{ dotfiles.rcup_flags }} when: dotfiles is defined become: yes become_user: "{{ user.name }}"