mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
More file refactoring (#40114)
* Set src in the state functions rather than the toplevel A good API should only require passing one version of a piece of data around so do that for src * Move the rewriting of path into additional_parameter_handling When the path is a directory we can rewrite the path to be a file inside of the directory * Emit a warning when src is used with a state where it should be ignored
This commit is contained in:
8
changelogs/fragments/file-disallow-src.yaml
Normal file
8
changelogs/fragments/file-disallow-src.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
bugfixes:
|
||||
- file module - The file module allowed the user to specify src as a parameter
|
||||
when state was not link or hard. This is documented as only applying to
|
||||
state=link or state=hard but in previous Ansible, this could have an effect
|
||||
in rare cornercases. For instance, "ansible -m file -a 'state=directory
|
||||
path=/tmp src=/var/lib'" would create /tmp/lib. This has been disabled and
|
||||
a warning emitted (will change to an error in Ansible-2.10).
|
||||
Reference in New Issue
Block a user