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
8b1f0b9f
Commit
8b1f0b9f
authored
Sep 09, 2015
by
Jim Abramson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2272 from edx/jsa/xcom-284
Add oscar_populate_countries to ecommerce playbook.
parents
8b1e8ba4
b8cfdabd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
playbooks/roles/ecommerce/tasks/main.yml
+17
-0
No files found.
playbooks/roles/ecommerce/tasks/main.yml
View file @
8b1f0b9f
...
...
@@ -61,6 +61,23 @@
environment
:
"
{{
ecommerce_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
-
name
:
populate countries
shell
:
>
chdir={{ ecommerce_code_dir }}
DB_MIGRATION_USER={{ COMMON_MYSQL_MIGRATE_USER }}
DB_MIGRATION_PASS={{ COMMON_MYSQL_MIGRATE_PASS }}
{{ ecommerce_home }}/venvs/{{ ecommerce_service_name }}/bin/python ./manage.py oscar_populate_countries
sudo_user
:
"
{{
ecommerce_user
}}"
environment
:
"
{{
ecommerce_environment
}}"
when
:
migrate_db is defined and migrate_db|lower == "yes"
# the `register` and `failed_when` directives below are here to emulate idempotency for this oscar command.
# if and when https://github.com/django-oscar/django-oscar/pull/1841 is merged, the directives can be removed
# in favor of the (proposed) --initial-only command option.
register
:
command_result
failed_when
:
-
"
'You
already
have
countries
in
your
database'
not
in
command_result.stderr"
-
"
command_result.rc
!=
0"
-
name
:
run r.js optimizer
shell
:
>
chdir={{ ecommerce_code_dir }}
...
...
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