mirror of
https://github.com/ansible/ansible.git
synced 2026-08-03 08:03:05 +02:00
dnf: allow for download_only to be run without root (#75532)
Fixes #75530
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
minor_changes:
|
||||
- dnf - allow for ``download_only`` to be run without root privileges (https://github.com/ansible/ansible/issues/75530)
|
||||
@@ -1348,7 +1348,7 @@ class DnfModule(YumDnf):
|
||||
else:
|
||||
# Note: base takes a long time to run so we want to check for failure
|
||||
# before running it.
|
||||
if not dnf.util.am_i_root():
|
||||
if not self.download_only and not dnf.util.am_i_root():
|
||||
self.module.fail_json(
|
||||
msg="This command has to be run under the root user.",
|
||||
results=[],
|
||||
|
||||
Reference in New Issue
Block a user