Skip to content
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

copy module complains that "absolute paths are required" #23017

Closed
Nirkus opened this issue Mar 27, 2017 · 5 comments
Closed

copy module complains that "absolute paths are required" #23017

Nirkus opened this issue Mar 27, 2017 · 5 comments
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. files Files category module This issue/PR relates to a module. P3 Priority 3 - Approved, No Time Limitation support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@Nirkus
Copy link

Nirkus commented Mar 27, 2017

ISSUE TYPE
  • Bug Report
COMPONENT NAME

module copy

ANSIBLE VERSION
$ ansible --version
ansible 2.2.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
CONFIGURATION
OS / ENVIRONMENT
$ lsb_release -idrc
Distributor ID: Debian
Description:    Debian GNU/Linux 8.7 (jessie)
Release:        8.7
Codename:       jessie
SUMMARY

When deploying an application cluster, I am copying the applications war file to destination hosts before deploying them to multiple tomcat instances.
Currently, my playbook copies the .war file from the local "files/" directory on the ansible control machine.
On the target machine, the war file is renamed (compared to src) and ownership and mode are changed.
When the file is already present on the target machine and has the correct checksum, module "copy" complains that "absolute paths are required" and fails.

STEPS TO REPRODUCE

https://gist.github.com/Nirkus/ee6d1782be1e7e1cdaa6ca8fcece066c
https://gist.github.com/Nirkus/941281b7b89c416e6ecd3a205ec03bbc

EXPECTED RESULTS
  • copy the file to target machine if missing
  • continue with success w/o copying the file if present and checksum matches
ACTUAL RESULTS

When the file is already present on the target machine and has the correct checksum, module "copy" complains that "absolute paths are required" and fails.
(see gist links above)

@ansibot ansibot added affects_2.2 This issue/PR affects Ansible v2.2 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. labels Mar 27, 2017
@Nirkus
Copy link
Author

Nirkus commented Mar 27, 2017

@Qalthos Qalthos removed the needs_triage Needs a first human triage before being processed. label Mar 30, 2017
@ansibot ansibot added the support:core This issue/PR relates to code supported by the Ansible Engineering Team. label Jun 29, 2017
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 1, 2018
@ansibot
Copy link
Contributor

ansibot commented Oct 25, 2018

cc @ptux
click here for bot help

@ansibot ansibot added the files Files category label Mar 6, 2019
@samdoran
Copy link
Contributor

That error seems to be coming from ln since it doesn't appear in any Ansible code. Is the destination file a sym link?

@samdoran samdoran added needs_verified This issue needs to be verified/reproduced by maintainer P3 Priority 3 - Approved, No Time Limitation labels Sep 18, 2020
@relrod
Copy link
Member

relrod commented Sep 18, 2020

This error message did exist in Ansible 2.5 and down, but was removed in 2.6+. This might be fixed in 2.6.

@sivel
Copy link
Member

sivel commented Jul 28, 2022

I have not been able to reproduce this in recent versions of ansible. If you are still having problems, please feel free to open a new issue with a simple reproducer.

If you have further questions please stop by IRC or the mailing list:

@sivel sivel closed this as completed Jul 28, 2022
@sivel sivel removed the needs_verified This issue needs to be verified/reproduced by maintainer label Jul 28, 2022
@ansible ansible locked and limited conversation to collaborators Aug 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.2 This issue/PR affects Ansible v2.2 bug This issue/PR relates to a bug. files Files category module This issue/PR relates to a module. P3 Priority 3 - Approved, No Time Limitation support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

6 participants