Unable to symlink directory from role files

33 views
Skip to first unread message

Paulo Borges

unread,
Apr 20, 2015, 2:02:11 PM4/20/15
to ansible...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages