mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* django_manage - fix fixures
* docs formatting adjustments
* param apps also in need of splitting
* oops, the splitted version was not being properly added to the command args
* added changelog fragment
* check for None
* moving to shlex.split()
* Update changelogs/fragments/3334-django_manage-split-params.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dd25c0d3bf
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
2c167547f6
commit
b9c8d2bee5
2 changed files with 9 additions and 4 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- django_manage - parameters ``apps`` and ``fixtures`` are now splitted instead of being used as a single argument (https://github.com/ansible-collections/community.general/issues/3333).
|
|
@ -62,7 +62,7 @@ options:
|
||||||
clear:
|
clear:
|
||||||
description:
|
description:
|
||||||
- Clear the existing files before trying to copy or link the original file.
|
- Clear the existing files before trying to copy or link the original file.
|
||||||
- Used only with the 'collectstatic' command. The C(--noinput) argument will be added automatically.
|
- Used only with the C(collectstatic) command. The C(--noinput) argument will be added automatically.
|
||||||
required: false
|
required: false
|
||||||
default: no
|
default: no
|
||||||
type: bool
|
type: bool
|
||||||
|
@ -109,9 +109,9 @@ options:
|
||||||
required: false
|
required: false
|
||||||
aliases: [test_runner]
|
aliases: [test_runner]
|
||||||
notes:
|
notes:
|
||||||
- C(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the virtualenv parameter
|
- C(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the I(virtualenv) parameter
|
||||||
is specified.
|
is specified.
|
||||||
- This module will create a virtualenv if the virtualenv parameter is specified and a virtualenv does not already
|
- This module will create a virtualenv if the I(virtualenv) parameter is specified and a virtual environment does not already
|
||||||
exist at the given location.
|
exist at the given location.
|
||||||
- This module assumes English error messages for the C(createcachetable) command to detect table existence,
|
- This module assumes English error messages for the C(createcachetable) command to detect table existence,
|
||||||
unfortunately.
|
unfortunately.
|
||||||
|
@ -306,7 +306,10 @@ def main():
|
||||||
# these params always get tacked on the end of the command
|
# these params always get tacked on the end of the command
|
||||||
for param in end_of_command_params:
|
for param in end_of_command_params:
|
||||||
if module.params[param]:
|
if module.params[param]:
|
||||||
run_cmd_args.append(module.params[param])
|
if param in ('fixtures', 'apps'):
|
||||||
|
run_cmd_args.extend(shlex.split(module.params[param]))
|
||||||
|
else:
|
||||||
|
run_cmd_args.append(module.params[param])
|
||||||
|
|
||||||
rc, out, err = module.run_command(run_cmd_args, cwd=project_path)
|
rc, out, err = module.run_command(run_cmd_args, cwd=project_path)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
|
|
Loading…
Reference in a new issue