Commit 7a411986 by Ibrahim

setup separate role for whitelabel

parent 7557cbbf
- name: Setup Whitelabel themes
hosts: all
become: True
gather_facts: True
vars_files:
- "roles/edxapp/defaults/main.yml"
roles:
- whitelabel
...@@ -162,15 +162,3 @@ ...@@ -162,15 +162,3 @@
tags: tags:
- gather_static_assets - gather_static_assets
- assets - assets
- name: Create Sites and Themes
shell: >
{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms --settings={{ COMMON_EDXAPP_SETTINGS }}
create_sites_and_configurations --dns-name {{ dns_name }}
become_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}"
- name: "display compile assets command"
debug:
msg: "{{ COMMON_BIN_DIR }}/edxapp-update-assets-{{ item }}"
with_items: "{{ service_variants_enabled }}"
...@@ -73,24 +73,6 @@ ...@@ -73,24 +73,6 @@
delay: 30 delay: 30
with_items: "{{ ec2.instances }}" with_items: "{{ ec2.instances }}"
- name: Add DNS name for themes
local_action:
module: route53
overwrite: yes
command: create
zone: "{{ dns_zone }}"
type: CNAME
ttl: 300
record: "{{ item[1] }}-{{ dns_name }}.{{ dns_zone }}"
value: "{{ item[0].public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_nested:
- "{{ ec2.instances }}"
- ['mitxpro', 'hms', 'harvardx', 'wharton', 'juilliard', 'campus']
- name: Add DNS names for services - name: Add DNS names for services
local_action: local_action:
module: route53 module: route53
...@@ -109,27 +91,6 @@ ...@@ -109,27 +91,6 @@
- "{{ ec2.instances }}" - "{{ ec2.instances }}"
- ['studio', 'ecommerce', 'preview', 'discovery', 'credentials', 'veda'] - ['studio', 'ecommerce', 'preview', 'discovery', 'credentials', 'veda']
- name: Add DNS names for themes services
local_action:
module: route53
overwrite: yes
command: create
zone: "{{ dns_zone }}"
type: CNAME
ttl: 300
record: "{{ item[1] }}-{{ item[2] }}-{{ dns_name }}.{{ dns_zone }}"
value: "{{ item[0].public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_nested:
- "{{ ec2.instances }}"
- ['studio', 'ecommerce', 'preview', 'discovery', 'credentials']
- ['mitxpro', 'hms', 'harvardx', 'wharton', 'juilliard']
- name: Display cnames - name: Display cnames
debug: debug:
msg: "{{ item[1] }}-{{ dns_name }}.{{ dns_zone }} {{ item[0].public_dns_name }}" msg: "{{ item[1] }}-{{ dns_name }}.{{ dns_zone }} {{ item[0].public_dns_name }}"
......
- name: Add DNS name for themes
local_action:
module: route53
overwrite: yes
command: create
zone: "{{ dns_zone }}"
type: CNAME
ttl: 300
record: "{{ item[1] }}-{{ dns_name }}.{{ dns_zone }}"
value: "{{ item[0].public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_nested:
- "{{ ec2.instances }}"
- ['mitxpro', 'hms', 'harvardx', 'wharton', 'juilliard', 'campus']
- name: Add DNS names for themes services
local_action:
module: route53
overwrite: yes
command: create
zone: "{{ dns_zone }}"
type: CNAME
ttl: 300
record: "{{ item[1] }}-{{ item[2] }}-{{ dns_name }}.{{ dns_zone }}"
value: "{{ item[0].public_dns_name }}"
register: task_result
until: task_result|succeeded
retries: 5
delay: 30
with_nested:
- "{{ ec2.instances }}"
- ['studio', 'ecommerce', 'preview', 'discovery', 'credentials']
- ['mitxpro', 'hms', 'harvardx', 'wharton', 'juilliard']
- name: Create Sites and Themes
shell: >
{{ COMMON_BIN_DIR }}/python.edxapp {{ COMMON_BIN_DIR }}/manage.edxapp lms --settings={{ COMMON_EDXAPP_SETTINGS }}
create_sites_and_configurations --dns-name {{ dns_name }}
become_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}"
- name: "display compile assets command"
debug:
msg: "{{ COMMON_BIN_DIR }}/edxapp-update-assets-{{ item }}"
with_items: "{{ service_variants_enabled }}"
...@@ -404,5 +404,7 @@ fi ...@@ -404,5 +404,7 @@ fi
# set the hostname # set the hostname
run_ansible set_hostname.yml -i "${deploy_host}," -e hostname_fqdn=${deploy_host} --user ubuntu run_ansible set_hostname.yml -i "${deploy_host}," -e hostname_fqdn=${deploy_host} --user ubuntu
run_ansible whitelabel.yml -i "${deploy_host}," $extra_var_arg --user ubuntu
rm -f "$extra_vars_file" rm -f "$extra_vars_file"
rm -f ${extra_vars_file}_clean rm -f ${extra_vars_file}_clean
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment