On 13 July 2016 at 22:09, Neubyr N <[email protected]> wrote:
>
>Right now file name
> passed to the webserver role is relative path from the playbook file. Is
> there any way to make this path independent of playbook location and
> reference it using role directory?

Yes - if you have tasks in a role 'thingy' like this:

- name: config
  copy: src=etc/file.conf
            dest=/etc/file.conf

- name: more config
   template: src=etc/file2.conf.j2
                   dest=/etc/file2.conf


then

* the copy task will load its source file from roles/thingy/files/etc/file.conf
* the template task will load its template from
roles/thingy/templates/etc/file2.conf.j2

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAK5eLPSNqwN92A5kk2Va0h1YKSE4Je9B%2BdNkxALjQ7bOtz%2BYdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to