I'm trying code
- name: create a symlink
ansible.builtin.file:
src: /usr/share/easy-rsa/*
dest: ~/easy-rsa/
state: link
but getting err Error while replacing: [Errno 2] No such file or directory: b'/usr/share/easy-rsa/*'
Is it possible to create a symlink with ansible.builtin.file using wildcard?
In short,
If using
shellmodule with Bash you could do something like this.The long answer would be to check the existence of directories and create the symlinks within a loop. For this a few tasks will be necessary.
Credits To
and many more ...