Ansible : create a relative symlink

前端 未结 1 1116
轮回少年
轮回少年 2021-02-03 17:45

In my playbook, I need to create a symbolic link for a repo.

With command (shell) it may work like this:

########## Create symbolic link 
- name: Create          


        
相关标签:
1条回答
  • 2021-02-03 18:08

    Simply:

    - name: Create symbolic link 
      file:
        src: "{{SOURCE_FOLDER}}"
        dest: "/opt/application/i99/SYMLINK"
        state: link
    

    As you can see in the manual for the file module:

    src  Will accept absolute, relative and nonexisting paths. Relative paths are not expanded.

    0 讨论(0)
提交回复
热议问题