Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
7b763dc4
Commit
7b763dc4
authored
Jun 14, 2013
by
Jochen Maes
Committed by
Michael DeHaan
Jun 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds 2 django commands (migrate, collectstatic)
Signed-off-by: Jochen Maes <jochen@sejo-it.be>
parent
70a9be27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
library/web_infrastructure/django_manage
+22
-2
No files found.
library/web_infrastructure/django_manage
View file @
7b763dc4
...
...
@@ -28,7 +28,7 @@ description:
version_added: "1.1"
options:
command:
choices: [ 'cleanup', 'flush', 'loaddata', 'runfcgi', 'syncdb', 'test', 'validate' ]
choices: [ 'cleanup', 'flush', 'loaddata', 'runfcgi', 'syncdb', 'test', 'validate'
, 'migrate', 'collectstatic'
]
description:
- The name of the Django management command to run. Allowed commands are cleanup, createcachetable, flush, loaddata, syncdb, test, validate.
required: true
...
...
@@ -70,10 +70,24 @@ options:
description:
- A space-delimited list of fixture file names to load in the database. B(Required) by the 'loaddata' command.
required: false
skip:
description:
- Will skip over out-of-order missing migrations, you can only use this parameter with I(migrate)
required: false
merge:
description:
- Will run out-of-order or missing migrations as they are not rollback migrations, you can only use this parameter with 'migrate' command
required: false
link:
description:
- Will create links to the files instead of copying them, you can only use this parameter with 'collectstatic' command
required: false
notes:
- I(virtualenv) (U(http://www.virtualenv.org)) must be installed on the remote host if the virtualenv parameter is specified.
- This module will create a virtualenv if the virtualenv parameter is specified and a virtualenv does not already exist at the given location.
- This module assumes English error messages for the 'createcachetable' command to detect table existence, unfortunately.
- To be able to use the migrate command, you must have south installed and added as an app in your settings
- To be able to use the collectstatic command, you must have enabled staticfiles in your settings
requirements: [ "virtualenv", "django" ]
author: Scott Anderson
'''
...
...
@@ -150,6 +164,8 @@ def main():
syncdb
=
(
'database'
,
),
test
=
(
'failfast'
,
'testrunner'
,
'liveserver'
,
'apps'
,
),
validate
=
(),
migrate
=
(
'apps'
,
'skip'
,
'database'
,
'merge'
),
collectstatic
=
(
'link'
,
),
)
command_required_param_map
=
dict
(
...
...
@@ -162,6 +178,7 @@ def main():
'flush'
,
'syncdb'
,
'test'
,
'collectstatic'
,
)
# These params are allowed for certain commands only
...
...
@@ -169,7 +186,7 @@ def main():
# These params are automatically added to the command if present
general_params
=
(
'settings'
,
'pythonpath'
,
)
specific_boolean_params
=
(
'failfast'
,
)
specific_boolean_params
=
(
'failfast'
,
'skip'
,
'merge'
,
'link'
)
end_of_command_params
=
(
'apps'
,
'cache_table'
,
'fixtures'
,
)
module
=
AnsibleModule
(
...
...
@@ -187,6 +204,9 @@ def main():
fixtures
=
dict
(
default
=
None
,
required
=
False
),
liveserver
=
dict
(
default
=
None
,
required
=
False
,
aliases
=
[
'live_server'
]),
testrunner
=
dict
(
default
=
None
,
required
=
False
,
aliases
=
[
'test_runner'
]),
skip
=
dict
(
default
=
None
,
required
=
False
,
choices
=
BOOLEANS
),
merge
=
dict
(
default
=
None
,
required
=
False
,
choices
=
BOOLEANS
),
link
=
dict
(
default
=
None
,
required
=
False
,
choices
=
BOOLEANS
),
),
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment