Files
ansible_role_package/tasks/helpers/symlink.yml
2026-04-13 14:50:45 -06:00

21 lines
536 B
YAML

# vim: set filetype=yaml.ansible :
#
## Helper: symlink.yml
## Description: symlink source to target
## Variables:
## - from: the source of the symlink
## - to: path of the symlink
## - force: _optional_, force create the symlink
---
- name: Create symlinks
become: "{{ install_become }}"
become_user: "{{ install_become_user }}"
loop: "{{ links }}"
loop_control:
loop_var: link
ansible.builtin.file:
state: link
path: "{{ link.to }}"
src: "{{ link.from }}"
force: "{{ link.force | default(omit) }}"