# Unable to symlink directory from role files

**URL:** <https://forum.ansible.com/t/unable-to-symlink-directory-from-role-files/18025>\
**Category:** Ansible Project\
**Created:** [April 20, 2015, 5:50pm UTC](https://forum.ansible.com/t/unable-to-symlink-directory-from-role-files/18025 "2015-04-20T17:50:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Borges](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@Paulo\_Borges](https://forum.ansible.com/u/Paulo_Borges)\
**Post date:** [April 20, 2015, 5:50pm UTC](https://forum.ansible.com/t/unable-to-symlink-directory-from-role-files/18025/1 "2015-04-20T17:50:10Z")

</div>

Hello list,

I have a role with the following structure:

> $ tree  
> .  
> ├── files  
> │ └── powerline  
> │ └── […]  
> └── tasks  
> └── main.yml

And my tasks file has, among other tasks, the following one:

> - name: symlink custom config files  
> file: src=powerline dest=~/.config/powerline state=link force=yes

When I execute this task, my ~/.config/powerline becomes:

> ls -l ~/.config/powerline  
> lrwxrwxrwx. 1 borges borges 9 Apr 20 14:45 /home/borges/.config/powerline → powerline

As you can see, it doesn’t resolve to the correct place (apparently it’s using a relative smylink). How can I specify `file` to use absolute paths to role files without hardcode the entire path? Or there is another solution to this problem?

Thank you,  
Paulo
