-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible breaks backwards-compatibility when constructing paths for source files #17877
Comments
I ran into this in 2.2.0 RC1 using the 'copy' module. The following task:
with the source file at
|
Debug output:
|
I created a PR to fix this, but it may not be "correct". |
is this fix included 2.2? Because this just hit me with the new ansible 2.2 with the copy-module. As I'm not sure if I should open another issue for this or if it is this code not having landed in 2.2, I thought I might ask here. :) |
Yes, this is fixed as of 2.2.0 RC2. It's likely not the same issue, as I can verify it's still fixed in 2.2.0 |
then I'll open another issue for this. |
(cherry picked from commit 72f0aaf) (cherry picked from commit ef3fa115d3ba319b7f6a7a86a85655d9cf766120)
ISSUE TYPE
COMPONENT NAME
tasks-execution, path-creation, to be observed at least in the
file
- andtemplate
-moduleANSIBLE VERSION
CONFIGURATION
Central ansible-folder changed to ~/.ansible
roles-folder configured to ~/.ansible/roles
OS / ENVIRONMENT
Linux, but most likely unrelated to OS
SUMMARY
template: src=template/{{ item }} dest=/etc/{{ item }}
used to work in rolesfile: src=template/{{ item }} dest=/etc/{{ item }}
used to work as well in roles.(with_items-section deliberately left out).
With the above mentioned version, this must be changed to
template: src={{ item }} dest=/etc/{{ item }}
to work.STEPS TO REPRODUCE
create a role with files
in the main.yml, put:
and execute that. With ansible 2.1 this works, with the above noted version, it doesn't.
Error:
"Unable to find 'templates/foobar.txt' in expected paths."
Changing to
fixes the issue for the templating module.
The text was updated successfully, but these errors were encountered: