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
7c55c68b
Commit
7c55c68b
authored
Jun 29, 2016
by
Christina Roberts
Committed by
GitHub
Jun 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3195 from edx/christina/configuration_model_playbook
Create an ansible script for running populate_model.
parents
519fe920
24bb55f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
playbooks/edx-east/populate_configuration_model.yml
+46
-0
No files found.
playbooks/edx-east/populate_configuration_model.yml
0 → 100644
View file @
7c55c68b
#
# edX Configuration
#
# github: https://github.com/edx/configuration
# wiki: https://openedx.atlassian.net/wiki/display/OpenOPS
# code style: https://openedx.atlassian.net/wiki/display/OpenOPS/Ansible+Code+Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
#
# Usage: ansible-playbook -i lms-host-1, -e "file=/path/to/json/file" -e "user=username"
#
# Overview:
# This executes the "populate_model" management command to populate a ConfigurationModel with
# data from the supplied JSON file.
#
# The username of an existing user must be specified to indicate who is performing the operation.
#
# JSON file format should be:
#
# { "model": "config_models.ExampleConfigurationModel",
# "data":
# [
# { "enabled": True,
# "color": "black"
# ...
# },
# { "enabled": False,
# "color": "yellow"
# ...
# },
# ...
# ]
# }
#
-
hosts
:
all
vars
:
python_path
:
/edx/bin/python.edxapp
manage_path
:
/edx/bin/manage.edxapp
tasks
:
-
name
:
Manage xblock configurations
shell
:
>
{{ python_path }} {{ manage_path }} lms --settings=aws
populate_model -f {{ file | quote }} -u {{ user }}
register
:
command_result
changed_when
:
"
'Import
complete,
0
new
entries
created'
not
in
command_result.stdout"
-
debug
:
msg="{{ command_result.stdout }}"
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