mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* ansible_galaxy_install: added no_deps option
* added changelog fragment
* Update plugins/modules/packaging/language/ansible_galaxy_install.py
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 98073a2642
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
3d2caf3933
commit
c08a57a7c1
2 changed files with 12 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- ansible_galaxy_install - added option ``no_deps`` to the module (https://github.com/ansible-collections/community.general/issues/4174).
|
|
@ -53,6 +53,12 @@ options:
|
||||||
Please notice that C(ansible-galaxy) will not install collections with I(type=both), when I(requirements_file)
|
Please notice that C(ansible-galaxy) will not install collections with I(type=both), when I(requirements_file)
|
||||||
contains both roles and collections and I(dest) is specified.
|
contains both roles and collections and I(dest) is specified.
|
||||||
type: path
|
type: path
|
||||||
|
no_deps:
|
||||||
|
description:
|
||||||
|
- Refrain from installing dependencies.
|
||||||
|
version_added: 4.5.0
|
||||||
|
type: bool
|
||||||
|
default: false
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Force overwriting an existing role or collection.
|
- Force overwriting an existing role or collection.
|
||||||
|
@ -178,7 +184,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
|
||||||
ansible_version = None
|
ansible_version = None
|
||||||
is_ansible29 = None
|
is_ansible29 = None
|
||||||
|
|
||||||
output_params = ('type', 'name', 'dest', 'requirements_file', 'force')
|
output_params = ('type', 'name', 'dest', 'requirements_file', 'force', 'no_deps')
|
||||||
module = dict(
|
module = dict(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
type=dict(type='str', choices=('collection', 'role', 'both'), required=True),
|
type=dict(type='str', choices=('collection', 'role', 'both'), required=True),
|
||||||
|
@ -186,6 +192,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
|
||||||
requirements_file=dict(type='path'),
|
requirements_file=dict(type='path'),
|
||||||
dest=dict(type='path'),
|
dest=dict(type='path'),
|
||||||
force=dict(type='bool', default=False),
|
force=dict(type='bool', default=False),
|
||||||
|
no_deps=dict(type='bool', default=False),
|
||||||
ack_ansible29=dict(type='bool', default=False),
|
ack_ansible29=dict(type='bool', default=False),
|
||||||
),
|
),
|
||||||
mutually_exclusive=[('name', 'requirements_file')],
|
mutually_exclusive=[('name', 'requirements_file')],
|
||||||
|
@ -201,6 +208,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
|
||||||
requirements_file=dict(fmt=('-r', '{0}'),),
|
requirements_file=dict(fmt=('-r', '{0}'),),
|
||||||
dest=dict(fmt=('-p', '{0}'),),
|
dest=dict(fmt=('-p', '{0}'),),
|
||||||
force=dict(fmt="--force", style=ArgFormat.BOOLEAN),
|
force=dict(fmt="--force", style=ArgFormat.BOOLEAN),
|
||||||
|
no_deps=dict(fmt="--no-deps", style=ArgFormat.BOOLEAN),
|
||||||
)
|
)
|
||||||
force_lang = "en_US.UTF-8"
|
force_lang = "en_US.UTF-8"
|
||||||
check_rc = True
|
check_rc = True
|
||||||
|
@ -293,7 +301,7 @@ class AnsibleGalaxyInstall(CmdModuleHelper):
|
||||||
self._setup29()
|
self._setup29()
|
||||||
else:
|
else:
|
||||||
self._setup210plus()
|
self._setup210plus()
|
||||||
params = ('type', {'galaxy_cmd': 'install'}, 'force', 'dest', 'requirements_file', 'name')
|
params = ('type', {'galaxy_cmd': 'install'}, 'force', 'no_deps', 'dest', 'requirements_file', 'name')
|
||||||
self.run_command(params=params)
|
self.run_command(params=params)
|
||||||
|
|
||||||
def process_command_output(self, rc, out, err):
|
def process_command_output(self, rc, out, err):
|
||||||
|
|
Loading…
Reference in a new issue