Add a new tasks file for symlinking a directory. Doing it this way instead of stat'ing the file and forking based on its type in symlink_dotfile.yml is more efficient, I think? Clean up file permissions: remove other permissions. Add a variable to toggle skipping symlink errors.
9 lines
333 B
YAML
9 lines
333 B
YAML
---
|
|
- name: "Symlink {{ dotfile_src }}"
|
|
ansible.builtin.file:
|
|
src: "{{ ansible_local.dotfiles.path }}/{{ dotfile_src }}"
|
|
dest: "{{ dotfile_dest | default('~/.' + dotfile_src) }}"
|
|
owner: "{{ ansible_user_id }}"
|
|
mode: 0640
|
|
state: link
|
|
ignore_errors: "{{ eryn_dotfiles_ignore_symlink_errors | default(false) }}"
|