mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-03 23:14:02 -07:00
[PR #10726/d0123a10 backport][stable-11] django_dumpdata, django_loaddata: new modules (#10790)
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
Some checks are pending
EOL CI / EOL Sanity (Ⓐ2.16) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py2.7) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.11) (push) Waiting to run
EOL CI / EOL Units (Ⓐ2.16+py3.6) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+alpine3+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+fedora38+py:azp/posix/3/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/1/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/2/) (push) Waiting to run
EOL CI / EOL I (Ⓐ2.16+opensuse15+py:azp/posix/3/) (push) Waiting to run
nox / Run extra sanity tests (push) Waiting to run
django_dumpdata, django_loaddata: new modules (#10726)
* django module, module_utils: adjustments
* more fixes
* more fixes
* further simplification
* django_dumpdata/django_loaddata: new modules
* Update plugins/modules/django_dumpdata.py
* add note about idempotency
---------
(cherry picked from commit d0123a1038
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
6e98e3d3eb
commit
12cf3dc19a
9 changed files with 364 additions and 4 deletions
|
@ -59,3 +59,24 @@ options:
|
|||
type: str
|
||||
default: default
|
||||
"""
|
||||
|
||||
DATA = r"""
|
||||
options:
|
||||
excludes:
|
||||
description:
|
||||
- Applications or models to be excluded.
|
||||
- Format must be either V(app_label) or V(app_label.ModelName).
|
||||
type: list
|
||||
elements: str
|
||||
format:
|
||||
description:
|
||||
- Serialization format of the output data.
|
||||
type: str
|
||||
default: json
|
||||
choices: [xml, json, jsonl, yaml]
|
||||
notes:
|
||||
- As it is now, the module is B(not idempotent). Ensuring idempotency for this case can be a bit tricky, because it would
|
||||
amount to ensuring beforehand that all the data in the fixture file is already in the database, which is not a trivial feat.
|
||||
Unfortunately, neither C(django loaddata) nor C(django dumpdata) have a C(--dry-run) option, so the only way to know whether
|
||||
there is a change or not is to actually load or dump the data.
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue