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

AnsibleModule.load_file_common_arguments: allow to override path #61659

Open
wants to merge 2 commits into
base: devel
from

Conversation

@felixfontein
Copy link
Contributor

commented Sep 1, 2019

SUMMARY

There are several modules which want to use load_file_common_arguments and set_fs_attributes_if_different, but not for the file specified in the module parameters, but for a different one. Most of them either override module.params['path'], or modify the result of load_file_common_arguments. This is not optimal, since in load_file_common_arguments, the path is used to follow links (if module.params.get('follow') is True) and to look up the selinux context.

This PR adds an optional argument path to load_file_common_arguments (default value None) which allows to use this path instead of module.params['path']/module.params['dest'].

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lib/ansible/module_utils/basic.py

@MarkusTeufelberger

This comment has been minimized.

Copy link
Contributor

commented Sep 8, 2019

Who can actually sign off on this?

bot_status

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

commented Sep 8, 2019

@MarkusTeufelberger the core team. I was planning to bring this up on the Ansible project meeting agenda somewhen, but so far I've been too busy with other things (and the core team probably as well :) ).

@ansibot

This comment has been minimized.

Copy link
Contributor

commented Sep 9, 2019

Components

lib/ansible/module_utils/basic.py
support: core
maintainers:

lib/ansible/module_utils/crypto.py
support: community
maintainers: MarkusTeufelberger Shaps Spredzy Xyon felixfontein puiterwijk resmo

lib/ansible/modules/files/archive.py
support: community
maintainers: bendoh

lib/ansible/modules/files/copy.py
support: core
maintainers: ansible ptux

lib/ansible/modules/net_tools/basics/get_url.py
support: core
maintainers: jpmens ptux

lib/ansible/modules/net_tools/basics/uri.py
support: core
maintainers:

lib/ansible/modules/packaging/language/maven_artifact.py
support: community
maintainers: tumbl3w33d turb

lib/ansible/modules/system/java_keystore.py
support: community
maintainers: Mogztter

Metadata

waiting_on: ansible
changes_requested_by: null
needs_info: False
needs_revision: False
needs_rebase: False
merge_commits: []
too many files or commits: False
mergeable_state: clean
shippable_status: success
maintainer_shipits (module maintainers): 0
community_shipits (namespace maintainers): 0
ansible_shipits (core team members): 1
shipit_actors (maintainers or core team members): felixfontein
shipit_actors_other: []
automerge: automerge shipit test failed

click here for bot help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.