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

Error when using readlink filter: no filter named 'readlink' #10062

Closed
lorin opened this issue Jan 22, 2015 · 1 comment
Closed

Error when using readlink filter: no filter named 'readlink' #10062

lorin opened this issue Jan 22, 2015 · 1 comment
Labels
docs This issue/PR relates to or includes documentation.

Comments

@lorin
Copy link
Contributor

lorin commented Jan 22, 2015

Issue Type:

Documentation Report

Ansible Version:
ansible-playbook 1.8.2
  configured module search path = None
Environment: N/A
Summary:

The Other Useful Filters section of the Variables document page references a filter named readlink, but it doesn't seem to exist.

Steps To Reproduce:

Playbook that reproduces the issue

- hosts: localhost
  vars:
  - myfile: /tmp
  tasks:
  - debug: msg={{ myfile | readlink }}
Expected Results:

Expected output like this:

ok: [localhost] => {
    "msg": "/private/tmp"
}
Actual Results:
ERROR: template error while templating string: no filter named 'readlink'

Note that there is a filter in lib/ansible/runner/filter_plugins/core.py called realpath, so maybe it should be realpath instead of readlink?

@bcoca bcoca added P3 labels Jan 26, 2015
@abadger
Copy link
Contributor

abadger commented Feb 26, 2015

Thanks for the bug report. You appear to be correct that we want realpath, not readlink.

Closing This Ticket

Hi!

We believe recent commits (likely detailed above) should resolve this question or problem for you.

This will also be included in the next major release.

If you continue seeing any problems related to this issue, or if you have any further questions, please let us know by stopping by one of the two mailing lists, as appropriate:

Because this project is very active, we're unlikely to see comments made on closed tickets, but the mailing list is a great way to ask questions, or post if you don't think this particular
issue is resolved.

Thank you!

@ansibot ansibot added docs This issue/PR relates to or includes documentation. and removed docs_report labels Mar 1, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs This issue/PR relates to or includes documentation.
Projects
None yet
Development

No branches or pull requests

4 participants