Commit c4ef75c1 by Kevin Falcone Committed by GitHub

Merge pull request #3355 from edx/jibsheet/copy-xblock-config-files

Copy XBlock configuraiton files to the remote server
parents 39aee51b 946aeb57
......@@ -37,10 +37,22 @@
python_path: /edx/bin/python.edxapp
manage_path: /edx/bin/manage.edxapp
tasks:
- name: Create a temp directory
shell: mktemp -d /tmp/ansible_xblock_config.XXXXX
register: xblock_config_temp_directory
- name: Copy config file to remote server
copy:
src: "{{ file }}"
dest: "{{ xblock_config_temp_directory.stdout }}/{{ file | basename }}"
register: xblock_config_file
- name: Manage xblock configurations
shell: >
{{ python_path }} {{ manage_path }} lms --settings=aws
populate_model -f {{ file | quote }} -u {{ user }}
populate_model -f {{ xblock_config_file.dest | quote }} -u {{ user }}
register: command_result
changed_when: "'Import complete, 0 new entries created' not in command_result.stdout"
- debug: msg="{{ command_result.stdout }}"
- name: Clean up tempdir
file:
path: "{{ xblock_config_temp_directory.stdout }}"
state: absent
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