mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-09 15:44:20 -07:00
django_command/django_check/django_createcachetable: add return value version (#9063)
* add return value version * add changelog frag * reformat yaml
This commit is contained in:
parent
39f3b151e8
commit
107df41d9c
8 changed files with 104 additions and 35 deletions
|
@ -8,48 +8,49 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: django_check
|
||||
author:
|
||||
- Alexei Znamensky (@russoz)
|
||||
- Alexei Znamensky (@russoz)
|
||||
short_description: Wrapper for C(django-admin check)
|
||||
version_added: 9.1.0
|
||||
description:
|
||||
- This module is a wrapper for the execution of C(django-admin check).
|
||||
- This module is a wrapper for the execution of C(django-admin check).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
options:
|
||||
database:
|
||||
description:
|
||||
- Specify databases to run checks against.
|
||||
- If not specified, Django will not run database tests.
|
||||
- Specify databases to run checks against.
|
||||
- If not specified, Django will not run database tests.
|
||||
type: list
|
||||
elements: str
|
||||
deploy:
|
||||
description:
|
||||
- Include additional checks relevant in a deployment setting.
|
||||
- Include additional checks relevant in a deployment setting.
|
||||
type: bool
|
||||
default: false
|
||||
fail_level:
|
||||
description:
|
||||
- Message level that will trigger failure.
|
||||
- Default is the Django default value. Check the documentation for the version being used.
|
||||
- Message level that will trigger failure.
|
||||
- Default is the Django default value. Check the documentation for the version being used.
|
||||
type: str
|
||||
choices: [CRITICAL, ERROR, WARNING, INFO, DEBUG]
|
||||
tags:
|
||||
description:
|
||||
- Restrict checks to specific tags.
|
||||
- Restrict checks to specific tags.
|
||||
type: list
|
||||
elements: str
|
||||
apps:
|
||||
description:
|
||||
- Restrict checks to specific applications.
|
||||
- Default is to check all applications.
|
||||
- Restrict checks to specific applications.
|
||||
- Default is to check all applications.
|
||||
type: list
|
||||
elements: str
|
||||
notes:
|
||||
- The outcome of the module is found in the common return values RV(ignore:stdout), RV(ignore:stderr), RV(ignore:rc).
|
||||
- The module will fail if RV(ignore:rc) is not zero.
|
||||
- The outcome of the module is found in the common return values RV(ignore:stdout), RV(ignore:stderr), RV(ignore:rc).
|
||||
- The module will fail if RV(ignore:rc) is not zero.
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
|
@ -58,6 +59,7 @@ attributes:
|
|||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
---
|
||||
- name: Check the entire project
|
||||
community.general.django_check:
|
||||
settings: myproject.settings
|
||||
|
@ -65,18 +67,25 @@ EXAMPLES = """
|
|||
- name: Create the project using specific databases
|
||||
community.general.django_check:
|
||||
database:
|
||||
- somedb
|
||||
- myotherdb
|
||||
- somedb
|
||||
- myotherdb
|
||||
settings: fancysite.settings
|
||||
pythonpath: /home/joedoe/project/fancysite
|
||||
venv: /home/joedoe/project/fancysite/venv
|
||||
"""
|
||||
|
||||
RETURN = """
|
||||
---
|
||||
run_info:
|
||||
description: Command-line execution information.
|
||||
type: dict
|
||||
returned: success and C(verbosity) >= 3
|
||||
version:
|
||||
description: Version of Django.
|
||||
type: str
|
||||
returned: always
|
||||
sample: 5.1.2
|
||||
version_added: 10.0.0
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.django import DjangoModuleHelper
|
||||
|
|
|
@ -8,16 +8,17 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: django_command
|
||||
author:
|
||||
- Alexei Znamensky (@russoz)
|
||||
- Alexei Znamensky (@russoz)
|
||||
short_description: Run Django admin commands
|
||||
version_added: 9.0.0
|
||||
description:
|
||||
- This module allows the execution of arbitrary Django admin commands.
|
||||
- This module allows the execution of arbitrary Django admin commands.
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
attributes:
|
||||
check_mode:
|
||||
support: none
|
||||
|
@ -26,17 +27,18 @@ attributes:
|
|||
options:
|
||||
command:
|
||||
description:
|
||||
- Django admin command. It must be a valid command accepted by C(python -m django) at the target system.
|
||||
- Django admin command. It must be a valid command accepted by C(python -m django) at the target system.
|
||||
type: str
|
||||
required: true
|
||||
extra_args:
|
||||
type: list
|
||||
elements: str
|
||||
description:
|
||||
- List of extra arguments passed to the django admin command.
|
||||
- List of extra arguments passed to the django admin command.
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
---
|
||||
- name: Check the project
|
||||
community.general.django_command:
|
||||
command: check
|
||||
|
@ -51,10 +53,17 @@ EXAMPLES = """
|
|||
"""
|
||||
|
||||
RETURN = """
|
||||
---
|
||||
run_info:
|
||||
description: Command-line execution information.
|
||||
type: dict
|
||||
returned: success and O(verbosity) >= 3
|
||||
version:
|
||||
description: Version of Django.
|
||||
type: str
|
||||
returned: always
|
||||
sample: 5.1.2
|
||||
version_added: 10.0.0
|
||||
"""
|
||||
|
||||
import shlex
|
||||
|
|
|
@ -8,17 +8,18 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
DOCUMENTATION = """
|
||||
---
|
||||
module: django_createcachetable
|
||||
author:
|
||||
- Alexei Znamensky (@russoz)
|
||||
- Alexei Znamensky (@russoz)
|
||||
short_description: Wrapper for C(django-admin createcachetable)
|
||||
version_added: 9.1.0
|
||||
description:
|
||||
- This module is a wrapper for the execution of C(django-admin createcachetable).
|
||||
- This module is a wrapper for the execution of C(django-admin createcachetable).
|
||||
extends_documentation_fragment:
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
- community.general.django.database
|
||||
- community.general.attributes
|
||||
- community.general.django
|
||||
- community.general.django.database
|
||||
attributes:
|
||||
check_mode:
|
||||
support: full
|
||||
|
@ -27,6 +28,7 @@ attributes:
|
|||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
---
|
||||
- name: Create cache table in the default database
|
||||
community.general.django_createcachetable:
|
||||
settings: myproject.settings
|
||||
|
@ -40,10 +42,17 @@ EXAMPLES = """
|
|||
"""
|
||||
|
||||
RETURN = """
|
||||
---
|
||||
run_info:
|
||||
description: Command-line execution information.
|
||||
type: dict
|
||||
returned: success and O(verbosity) >= 3
|
||||
version:
|
||||
description: Version of Django.
|
||||
type: str
|
||||
returned: always
|
||||
sample: 5.1.2
|
||||
version_added: 10.0.0
|
||||
"""
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.django import DjangoModuleHelper
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue