<p dir="auto">Given a role:</p>
<p dir="auto">web_server /<br>
tasks /<br>
main.yml<br>
files /<br>
httpd.conf</p>
<p dir="auto">And a task:</p>
<ul dir="auto">
<li>name: sync | httpd confnig<br>
synchronize: src=httpd.conf dest=/etc/apache2/conf.d/widget.conf</li>
</ul>
<p dir="auto">You'll get an error because it assumes httpd.conf is based in the same directory you call ansible playbook from. The copy module however will happily check files/ for you.</p>
<h5 dir="auto">Issue Type:</h5>
<p dir="auto">What kind of ticket is this?  You can say â€œBug Reportâ€�, â€œFeature Ideaâ€�, â€œFeature Pull Requestâ€�, â€œNew Module Pull Requestâ€�, â€œBugfix Pull Requestâ€�, â€œDocumentation Reportâ€�, or â€œDocs Pull Requestâ€�.</p>
<h5 dir="auto">Ansible Version:</h5>
<p dir="auto">Please supply the verbatim output from running â€œansible --versionâ€�.</p>
<h5 dir="auto">Environment:</h5>
<p dir="auto">What OS are you running Ansible from and what OS are you managing?  Examples include RHEL 5/6, Centos 5/6, Ubuntu 12.04/13.10, *BSD, Solaris.  If this is a generic feature request or it doesnâ€™t apply, just say â€œN/Aâ€�.</p>
<h5 dir="auto">Summary:</h5>
<p dir="auto">Please summarize your request in this space.  You will earn bonus points for being succinct, but please add enough detail so we can understand the request.</p>
<h5 dir="auto">Steps To Reproduce:</h5>
<p dir="auto">If this is a bug ticket, please enter the steps you use to reproduce the problem in the space below.  If this is a feature request, please enter the steps you would use to use the feature.  If an example playbook is useful, please include a short reproducer inline, indented by four spaces.  If a longer one is necessary, please link one uploaded to gist.github.com.</p>
<h5 dir="auto">Expected Results:</h5>
<p dir="auto">Please enter your expected results in this space.  When running the steps supplied above, what would you expect to happen?  If showing example output, indent your output by four spaces so it will render correctly in GitHub.</p>
<h5 dir="auto">Actual Results:</h5>
<p dir="auto">Please enter your actual results in this space.  When running the steps supplied above, what actually happened?  If showing example output, indent your output by four spaces so it will render correctly in GitHub.</p>
<p dir="auto">When trying to run a playbook with the synchronize module, the relative path is relative to where you are executing the playbook from, and it does not follow the roles logic.</p>
<p dir="auto">Example Playbook:</p>
<p dir="auto">-- roles/server/files/etc/scripts/test1.txt<br>
-- roles/server/files/etc/scripts/test2.txt</p>
<p dir="auto">-- roles/server/tasks/keep_files_synchronized.yml<br>
--&gt;   name: copy files to server<br>
--&gt;   synchronize: src=etc/scripts/ dest=/etc/scripts/ delete=yes</p>