Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
edx
configuration
Commits
642e46f0
Commit
642e46f0
authored
May 25, 2018
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a Continuous Deployment playbook to run a management command
parent
1e58dc73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
playbooks/continuous_delivery/run_management_command.yml
+39
-0
No files found.
playbooks/continuous_delivery/run_management_command.yml
0 → 100644
View file @
642e46f0
# This playbook will run a management command for a Django application.
#
#
# Required variables for this playbook:
#
# - APPLICATION_PATH - the top-level path of the Django application; the application lives underneath
# this directory in a directory with the same name as APPLICATION_NAME.
# - APPLICATION_NAME - The name of the application that we are running against
# - APPLICATION_USER - user which is meant to run the application
# - COMMAND - name of the management command to be run
#
# Other variables:
# - EDX_PLATFORM_SETTINGS - The settings to use for the edx platform {aws|devstack} DEFAULT: aws
#
# Example command line to run this playbook:
# ansible-playbook -vvvv -i "localhost," -c local \
# -e @overrides.yml \
# run_management_command.yml
#
-
hosts
:
all
vars
:
EDX_PLATFORM_SETTINGS
:
"
aws"
COMMAND_PREFIX
:
"
.
{{
APPLICATION_PATH
}}/{{
APPLICATION_NAME
}}_env;
/edx/bin/python.{{
APPLICATION_NAME
}}
/edx/bin/manage.{{
APPLICATION_NAME
}}"
gather_facts
:
False
become
:
True
tasks
:
-
name
:
run management command
shell
:
'
{{
COMMAND_PREFIX
}}
{{
COMMAND
}}'
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME != "edxapp"
-
name
:
run edxapp management command
shell
:
'
{{
COMMAND_PREFIX
}}
{{
COMMAND
}}
--settings
"{{
EDX_PLATFORM_SETTINGS
}}"'
become_user
:
"
{{
APPLICATION_USER
}}"
when
:
APPLICATION_NAME == "edxapp"
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