community.general.django_check module – Wrapper for django-admin check
Note
This module is part of the community.general collection (version 9.5.1).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.django_check
.
New in community.general 9.1.0
Synopsis
This module is a wrapper for the execution of
django-admin check
.
Parameters
Parameter |
Comments |
---|---|
Restrict checks to specific applications. Default is to check all applications. |
|
Specify databases to run checks against. If not specified, Django will not run database tests. |
|
Include additional checks relevant in a deployment setting. Choices:
|
|
Message level that will trigger failure. Default is the Django default value. Check the documentation for the version being used. Choices:
|
|
Adds the given filesystem path to the Python import search path. The value will be passed as is to the |
|
Specifies the settings module to use. The value will be passed as is to the |
|
Skips running system checks prior to running the command. Choices:
|
|
Restrict checks to specific tags. |
|
Provides a full stack trace in the output when a Choices:
|
|
Use the the Python interpreter from this virtual environment. Pass the path to the root of the virtualenv, not the |
|
Specifies the amount of notification and debug information in the output of Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Will return details on what has changed (or possibly needs changing in |
Notes
Note
The outcome of the module is found in the common return values
stdout
,stderr
,rc
.The module will fail if
rc
is not zero.The
django-admin
command is always executed using theC
locale, and the option--no-color
is always passed.
See Also
See also
- django-admin and manage.py in official Django documentation
Refer to this documentation for the builtin commands and options of
django-admin
. Please make sure that you select the right version of Django in the version selector on that page.
Examples
- name: Check the entire project
community.general.django_check:
settings: myproject.settings
- name: Create the project using specific databases
community.general.django_check:
database:
- somedb
- myotherdb
settings: fancysite.settings
pythonpath: /home/joedoe/project/fancysite
venv: /home/joedoe/project/fancysite/venv
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Command-line execution information. Returned: success and |