Commit 3446a2fb by arbabnazar

fix ansible 2.x error

parent 13173bff
--- ---
- name: create edxapp configuration dir - name: Create edxapp configuration dir
file: file:
path: "{{ EDXAPP_CFG_DIR }}" path: "{{ EDXAPP_CFG_DIR }}"
state: directory state: directory
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
- install - install
- install:base - install:base
- name: copy the template to the desired location - name: Copy the template to the desired location
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
- install - install
- install:base - install:base
- name: install read-only ssh key - name: Install read-only ssh key
copy: copy:
content: "{{ EDXAPP_GIT_IDENTITY }}" content: "{{ EDXAPP_GIT_IDENTITY }}"
dest: "{{ edxapp_git_identity }}" dest: "{{ edxapp_git_identity }}"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
- install - install
- install:base - install:base
- name: set git fetch.prune to ignore deleted remote refs - name: Set git fetch.prune to ignore deleted remote refs
shell: git config --global fetch.prune true shell: git config --global fetch.prune true
become_user: "{{ edxapp_user }}" become_user: "{{ edxapp_user }}"
tags: tags:
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
- install:base - install:base
# Do A Checkout # Do A Checkout
- name: checkout edx-platform repo into {{ edxapp_code_dir }} - name: Checkout edx-platform repo into {{ edxapp_code_dir }}
git_2_0_1: git_2_0_1:
dest: "{{ edxapp_code_dir }}" dest: "{{ edxapp_code_dir }}"
repo: "{{ edx_platform_repo }}" repo: "{{ edx_platform_repo }}"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
- install - install
- install:code - install:code
- name: git clean after checking out edx-platform - name: Git clean after checking out edx-platform
shell: cd {{ edxapp_code_dir }} && git clean -xdf shell: cd {{ edxapp_code_dir }} && git clean -xdf
become_user: "{{ edxapp_user }}" become_user: "{{ edxapp_user }}"
tags: tags:
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
# To enable Stanford theming, point edxapp_theme_source_repo # To enable Stanford theming, point edxapp_theme_source_repo
# (yes, lowercase) to a Stanford-style theme and set # (yes, lowercase) to a Stanford-style theme and set
# edxapp_theme_name (again, lowercase) to its name. # edxapp_theme_name (again, lowercase) to its name.
- name: checkout Stanford-style theme - name: Checkout Stanford-style theme
git_2_0_1: git_2_0_1:
dest: "{{ edxapp_app_dir }}/themes/{{ edxapp_theme_name }}" dest: "{{ edxapp_app_dir }}/themes/{{ edxapp_theme_name }}"
repo: "{{ edxapp_theme_source_repo }}" repo: "{{ edxapp_theme_source_repo }}"
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
# EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO to your theme repo, and set # EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO to your theme repo, and set
# EDXAPP_COMPREHENSIVE_THEME_DIR to the directory you want to check # EDXAPP_COMPREHENSIVE_THEME_DIR to the directory you want to check
# out to. # out to.
- name: checkout comprehensive theme - name: Checkout comprehensive theme
git_2_0_1: git_2_0_1:
dest: "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}" dest: "{{ EDXAPP_COMPREHENSIVE_THEME_DIR }}"
repo: "{{ EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO }}" repo: "{{ EDXAPP_COMPREHENSIVE_THEME_SOURCE_REPO }}"
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
# Private requriements require a ssh key to install, use the same key as the private key for edx-platform # Private requriements require a ssh key to install, use the same key as the private key for edx-platform
# If EDXAPP_INSTALL_PRIVATE_REQUIREMENTS is set to true EDXAPP_USE_GIT_IDENTITY must also be true # If EDXAPP_INSTALL_PRIVATE_REQUIREMENTS is set to true EDXAPP_USE_GIT_IDENTITY must also be true
- name: install python private requirements - name: Install python private requirements
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
- install:app-requirements - install:app-requirements
# Install any custom extra requirements if defined in EDXAPP_EXTRA_REQUIREMENTS. # Install any custom extra requirements if defined in EDXAPP_EXTRA_REQUIREMENTS.
- name: install python extra requirements - name: Install python extra requirements
pip: pip:
name: "{{ item.name }}" name: "{{ item.name }}"
version: "{{ item.version|default(omit) }}" version: "{{ item.version|default(omit) }}"
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
# If using CAS and you have a function for mapping attributes, install # If using CAS and you have a function for mapping attributes, install
# the module here. The next few tasks set up the python code sandbox # the module here. The next few tasks set up the python code sandbox
- name: install CAS attribute module - name: Install CAS attribute module
pip: pip:
name: "{{ EDXAPP_CAS_ATTRIBUTE_PACKAGE }}" name: "{{ EDXAPP_CAS_ATTRIBUTE_PACKAGE }}"
virtualenv: "{{ edxapp_venv_dir }}" virtualenv: "{{ edxapp_venv_dir }}"
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
- install:app-requirements - install:app-requirements
# Install the sandbox python modules into {{ edxapp_venv_dir }} # Install the sandbox python modules into {{ edxapp_venv_dir }}
- name: install sandbox requirements into regular venv - name: Install sandbox requirements into regular venv
# Need to use shell rather than pip so that we can maintain the context of our current working directory; some # Need to use shell rather than pip so that we can maintain the context of our current working directory; some
# requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly # requirements are pathed relative to the edx-platform repo. Using the pip from inside the virtual environment implicitly
# installs everything into that virtual environment. # installs everything into that virtual environment.
...@@ -264,7 +264,7 @@ ...@@ -264,7 +264,7 @@
# need to disable this profile, otherwise the pip inside the sandbox venv has no permissions # need to disable this profile, otherwise the pip inside the sandbox venv has no permissions
# to install anything # to install anything
- name: code sandbox | put sandbox apparmor profile in complain mode - name: Code sandbox | put sandbox apparmor profile in complain mode
command: /usr/sbin/aa-complain /etc/apparmor.d/code.sandbox command: /usr/sbin/aa-complain /etc/apparmor.d/code.sandbox
when: EDXAPP_PYTHON_SANDBOX when: EDXAPP_PYTHON_SANDBOX
tags: tags:
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
- install - install
- install:app-requirements - install:app-requirements
- name: code sandbox | Install base sandbox requirements and create sandbox virtualenv - name: Code sandbox | Install base sandbox requirements and create sandbox virtualenv
pip: pip:
requirements: "{{ sandbox_base_requirements }}" requirements: "{{ sandbox_base_requirements }}"
virtualenv: "{{ edxapp_sandbox_venv_dir }}" virtualenv: "{{ edxapp_sandbox_venv_dir }}"
...@@ -285,7 +285,7 @@ ...@@ -285,7 +285,7 @@
- install - install
- install:app-requirements - install:app-requirements
- name: code sandbox | Install sandbox requirements into sandbox venv - name: Code sandbox | Install sandbox requirements into sandbox venv
shell: > shell: >
{{ edxapp_sandbox_venv_dir }}/bin/pip install -i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w -r {{ item }} {{ edxapp_sandbox_venv_dir }}/bin/pip install -i {{ COMMON_PYPI_MIRROR_URL }} --exists-action w -r {{ item }}
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
...@@ -301,7 +301,7 @@ ...@@ -301,7 +301,7 @@
- install - install
- install:app-requirements - install:app-requirements
- name: code sandbox | put code sandbox into aa-enforce or aa-complain mode, depending on EDXAPP_SANDBOX_ENFORCE - name: Code sandbox | put code sandbox into aa-enforce or aa-complain mode, depending on EDXAPP_SANDBOX_ENFORCE
command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox
when: EDXAPP_PYTHON_SANDBOX when: EDXAPP_PYTHON_SANDBOX
tags: tags:
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
- install - install
- install:app-requirements - install:app-requirements
- name: compiling all py files in the edx-platform repo - name: Compiling all py files in the edx-platform repo
shell: "{{ edxapp_venv_bin }}/python -m compileall -q -x .git/.* {{ edxapp_code_dir }}" shell: "{{ edxapp_venv_bin }}/python -m compileall -q -x .git/.* {{ edxapp_code_dir }}"
become_user: "{{ edxapp_user }}" become_user: "{{ edxapp_user }}"
tags: tags:
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
# alternative would be to give {{ common_web_user }} read access # alternative would be to give {{ common_web_user }} read access
# to the virtualenv but that permission change will require # to the virtualenv but that permission change will require
# root access. # root access.
- name: give other read permissions to the virtualenv - name: Give other read permissions to the virtualenv
file: file:
path: "{{ edxapp_venv_dir }}" path: "{{ edxapp_venv_dir }}"
state: directory state: directory
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
# the services if any of the configurations # the services if any of the configurations
# have changed. # have changed.
- name: update supervisor configuration - name: Update supervisor configuration
shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update" shell: "{{ supervisor_ctl }} -c {{ supervisor_cfg }} update"
register: supervisor_update register: supervisor_update
become_user: "{{ supervisor_service_user }}" become_user: "{{ supervisor_service_user }}"
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
tags: tags:
- manage - manage
- name: ensure edxapp has started - name: Ensure edxapp has started
supervisorctl: supervisorctl:
name: "edxapp:" name: "edxapp:"
supervisorctl_path: "{{ supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
tags: tags:
- manage - manage
- name: ensure edxapp_workers has started - name: Ensure edxapp_workers has started
supervisorctl: supervisorctl:
name: "edxapp_worker:" name: "edxapp_worker:"
supervisorctl_path: "{{ supervisor_ctl }}" supervisorctl_path: "{{ supervisor_ctl }}"
...@@ -373,7 +373,7 @@ ...@@ -373,7 +373,7 @@
tags: tags:
- manage - manage
- name: create symlinks from the venv bin dir and repo dir - name: Create symlinks from the venv bin dir and repo dir
file: file:
src: "{{ item }}" src: "{{ item }}"
dest: "{{ COMMON_BIN_DIR }}/{{ (item | basename).split('.', 1) | first }}.edxapp" dest: "{{ COMMON_BIN_DIR }}/{{ (item | basename).split('.', 1) | first }}.edxapp"
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
- install - install
- install:configuration - install:configuration
- name: remove read-only ssh key - name: Remove read-only ssh key
file: file:
path: "{{ edxapp_git_identity }}" path: "{{ edxapp_git_identity }}"
state: absent state: absent
...@@ -397,9 +397,10 @@ ...@@ -397,9 +397,10 @@
- install:configuration - install:configuration
- install:code - install:code
- include: tag_ec2.yml tags=deploy - include: tag_ec2.yml
when: COMMON_TAG_EC2_INSTANCE when: COMMON_TAG_EC2_INSTANCE
tags: tags:
- deploy
- remove - remove
- aws - aws
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# - group_vars/all # - group_vars/all
# - common/tasks/main.yml # - common/tasks/main.yml
--- ---
- name: create application user - name: Create application user
user: user:
name: "{{ edxapp_user }}" name: "{{ edxapp_user }}"
home: "{{ edxapp_app_dir }}" home: "{{ edxapp_app_dir }}"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- install - install
- install:base - install:base
- name: create edxapp user dirs - name: Create edxapp user dirs
file: file:
path: "{{ item.path }}" path: "{{ item.path }}"
state: directory state: directory
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
# we currently can't override the DATA_DIR var # we currently can't override the DATA_DIR var
# in edx-platform. TODO: This can be removed once # in edx-platform. TODO: This can be removed once
# VPC-122 is closed # VPC-122 is closed
- name: make the course data dir - name: Make the course data dir
file: file:
src: "{{ edxapp_course_data_dir }}" src: "{{ edxapp_course_data_dir }}"
dest: "{{ edxapp_legacy_course_data_dir }}" dest: "{{ edxapp_legacy_course_data_dir }}"
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
- install - install
- install:base - install:base
- name: create edxapp log dir - name: Create edxapp log dir
file: file:
path: "{{ edxapp_log_dir }}" path: "{{ edxapp_log_dir }}"
state: directory state: directory
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
- install - install
- install:base - install:base
- name: create web-writable edxapp data dirs - name: Create web-writable edxapp data dirs
file: file:
path: "{{ item }}" path: "{{ item }}"
state: directory state: directory
...@@ -77,14 +77,14 @@ ...@@ -77,14 +77,14 @@
- install:base - install:base
# adding chris-lea nodejs repo # adding chris-lea nodejs repo
- name: add ppas for current versions of nodejs - name: Add ppas for current versions of nodejs
apt_repository: apt_repository:
repo: "{{ edxapp_chrislea_ppa }}" repo: "{{ edxapp_chrislea_ppa }}"
tags: tags:
- install - install
- install:base - install:base
- name: install system packages on which LMS and CMS rely - name: Install system packages on which LMS and CMS rely
apt: apt:
name: "{{ item }}" name: "{{ item }}"
state: present state: present
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
- install - install
- install:base - install:base
- name: set up edxapp .npmrc - name: Set up edxapp .npmrc
template: template:
src: .npmrc.j2 src: .npmrc.j2
dest: "{{ edxapp_app_dir }}/.npmrc" dest: "{{ edxapp_app_dir }}/.npmrc"
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
- install - install
- install:base - install:base
- name: create log directories for service variants - name: Create log directories for service variants
file: file:
path: "{{ edxapp_log_dir }}/{{ item }}" path: "{{ edxapp_log_dir }}/{{ item }}"
state: directory state: directory
......
--- ---
# Set the alternatives this way for blas and lapack to work correctly for the # Set the alternatives this way for blas and lapack to work correctly for the
# MITx 6.341x course. # MITx 6.341x course.
- name: code sandbox | Check which `libblas` to use - name: Code sandbox | Check which `libblas` to use
stat: stat:
path: /usr/lib/libblas/libblas.so.3gf path: /usr/lib/libblas/libblas.so.3gf
register: libblas_file register: libblas_file
- name: code sandbox | Use libblas.so.3gf in Ubuntu - name: Code sandbox | Use libblas.so.3gf in Ubuntu
alternatives: alternatives:
name: libblas.so.3gf name: libblas.so.3gf
path: /usr/lib/libblas/libblas.so.3gf path: /usr/lib/libblas/libblas.so.3gf
when: libblas_file.stat.exists when: libblas_file.stat.exists
- name: code sandbox | Use libblas.so.3 in Ubuntu - name: Code sandbox | Use libblas.so.3 in Ubuntu
alternatives: alternatives:
name: libblas.so.3 name: libblas.so.3
path: /usr/lib/libblas/libblas.so.3 path: /usr/lib/libblas/libblas.so.3
when: not libblas_file.stat.exists when: not libblas_file.stat.exists
- name: code sandbox | Check which `liblapac` to use - name: Code sandbox | Check which `liblapac` to use
stat: stat:
path: /usr/lib/lapack/liblapack.so.3gf path: /usr/lib/lapack/liblapack.so.3gf
register: liblapack_file register: liblapack_file
- name: code sandbox | Use liblapack.so.3gf in Ubuntu - name: Code sandbox | Use liblapack.so.3gf in Ubuntu
alternatives: alternatives:
name: liblapack.so.3gf name: liblapack.so.3gf
path: /usr/lib/lapack/liblapack.so.3gf path: /usr/lib/lapack/liblapack.so.3gf
when: liblapack_file.stat.exists when: liblapack_file.stat.exists
- name: code sandbox | Use liblapack.so.3 in Ubuntu - name: Code sandbox | Use liblapack.so.3 in Ubuntu
alternatives: alternatives:
name: liblapack.so.3 name: liblapack.so.3
path: /usr/lib/lapack/liblapack.so.3 path: /usr/lib/lapack/liblapack.so.3
when: not liblapack_file.stat.exists when: not liblapack_file.stat.exists
- name: code sandbox | Create edxapp sandbox user - name: Code sandbox | Create edxapp sandbox user
user: user:
name: "{{ edxapp_sandbox_user }}" name: "{{ edxapp_sandbox_user }}"
shell: /bin/false shell: /bin/false
...@@ -44,14 +44,14 @@ ...@@ -44,14 +44,14 @@
tags: tags:
- edxapp-sandbox - edxapp-sandbox
- name: code sandbox | Install apparmor utils system pkg - name: Code sandbox | Install apparmor utils system pkg
apt: apt:
name: apparmor-utils name: apparmor-utils
state: present state: present
tags: tags:
- edxapp-sandbox - edxapp-sandbox
- name: code sandbox | write out apparmor code sandbox config - name: Code sandbox | write out apparmor code sandbox config
template: template:
src: code.sandbox.j2 src: code.sandbox.j2
dest: /etc/apparmor.d/code.sandbox dest: /etc/apparmor.d/code.sandbox
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
tags: tags:
- edxapp-sandbox - edxapp-sandbox
- name: code sandbox | write out sandbox user sudoers config - name: Code sandbox | write out sandbox user sudoers config
template: template:
src: 95-sandbox-sudoer.j2 src: 95-sandbox-sudoer.j2
dest: "/etc/sudoers.d/95-{{ edxapp_sandbox_user }}" dest: "/etc/sudoers.d/95-{{ edxapp_sandbox_user }}"
...@@ -74,19 +74,19 @@ ...@@ -74,19 +74,19 @@
# we boostrap and enable the apparmor service here. In deploy.yml we disable, deploy, then re-enable # we boostrap and enable the apparmor service here. In deploy.yml we disable, deploy, then re-enable
# so we need to enable it in main.yml # so we need to enable it in main.yml
- name: code sandbox | start apparmor service - name: Code sandbox | start apparmor service
service: service:
name: apparmor name: apparmor
state: started state: started
tags: tags:
- edxapp-sandbox - edxapp-sandbox
- name: code sandbox | (bootstrap) load code sandbox profile - name: Code sandbox | (bootstrap) load code sandbox profile
command: apparmor_parser -r /etc/apparmor.d/code.sandbox command: apparmor_parser -r /etc/apparmor.d/code.sandbox
tags: tags:
- edxapp-sandbox - edxapp-sandbox
- name: code sandbox | (bootstrap) put code sandbox into aa-enforce or aa-complain mode depending on EDXAPP_SANDBOX_ENFORCE - name: Code sandbox | (bootstrap) put code sandbox into aa-enforce or aa-complain mode depending on EDXAPP_SANDBOX_ENFORCE
command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox command: /usr/sbin/{{ edxapp_aa_command }} /etc/apparmor.d/code.sandbox
tags: tags:
- edxapp-sandbox - edxapp-sandbox
--- ---
- name: create application and auth config - name: Create application and auth config
template: template:
src: "{{ item[0] }}.{{ item[1] }}.json.j2" src: "{{ item[0] }}.{{ item[1] }}.json.j2"
dest: "{{ edxapp_app_dir }}/{{ item[0] }}.{{ item[1] }}.json" dest: "{{ edxapp_app_dir }}/{{ item[0] }}.{{ item[1] }}.json"
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
- install:configuration - install:configuration
- edxapp_cfg - edxapp_cfg
- name: create auth and application yaml config - name: Create auth and application yaml config
template: template:
src: "{{ item[0] }}.{{ item[1] }}.yaml.j2" src: "{{ item[0] }}.{{ item[1] }}.yaml.j2"
dest: "{{ EDXAPP_CFG_DIR }}/{{ item[0] }}.{{ item[1] }}.yaml" dest: "{{ EDXAPP_CFG_DIR }}/{{ item[0] }}.{{ item[1] }}.yaml"
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
- edxapp_cfg - edxapp_cfg
# write the supervisor scripts for the service variants # write the supervisor scripts for the service variants
- name: "writing {{ item }} supervisor script" - name: "Writing {{ item }} supervisor script"
template: template:
src: "{{ item }}.conf.j2" src: "{{ item }}.conf.j2"
dest: "{{ supervisor_available_dir }}/{{ item }}.conf" dest: "{{ supervisor_available_dir }}/{{ item }}.conf"
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
- install:configuration - install:configuration
# write the supervisor script for edxapp and celery workers # write the supervisor script for edxapp and celery workers
- name: writing edxapp and celery supervisor scripts - name: Writing edxapp and celery supervisor scripts
template: template:
src: "{{ item }}.j2" src: "{{ item }}.j2"
dest: "{{ supervisor_available_dir }}/{{ item }}" dest: "{{ supervisor_available_dir }}/{{ item }}"
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
- install - install
- install:configuration - install:configuration
- name: add gunicorn configuration files - name: Add gunicorn configuration files
template: template:
src: "{{ item }}_gunicorn.py.j2" src: "{{ item }}_gunicorn.py.j2"
dest: "{{ edxapp_app_dir }}/{{ item }}_gunicorn.py" dest: "{{ edxapp_app_dir }}/{{ item }}_gunicorn.py"
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
- install:configuration - install:configuration
# Enable the supervisor jobs # Enable the supervisor jobs
- name: "enable {{ item }} supervisor script" - name: "Enable {{ item }} supervisor script"
file: file:
src: "{{ supervisor_available_dir }}/{{ item }}.conf" src: "{{ supervisor_available_dir }}/{{ item }}.conf"
dest: "{{ supervisor_cfg_dir }}/{{ item }}.conf" dest: "{{ supervisor_cfg_dir }}/{{ item }}.conf"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
- install - install
- install:configuration - install:configuration
- name: enable edxapp supervisor script - name: Enable edxapp supervisor script
file: file:
src: "{{ supervisor_available_dir }}/edxapp.conf" src: "{{ supervisor_available_dir }}/edxapp.conf"
dest: "{{ supervisor_cfg_dir }}/edxapp.conf" dest: "{{ supervisor_cfg_dir }}/edxapp.conf"
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
- install - install
- install:configuration - install:configuration
- name: enable celery worker supervisor script - name: Enable celery worker supervisor script
file: file:
src: "{{ supervisor_available_dir }}/workers.conf" src: "{{ supervisor_available_dir }}/workers.conf"
dest: "{{ supervisor_cfg_dir }}/workers.conf" dest: "{{ supervisor_cfg_dir }}/workers.conf"
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
- install - install
- install:configuration - install:configuration
- name: create helper scripts for managing edxapp - name: Create helper scripts for managing edxapp
template: template:
src: "edx/bin/{{ item[0] }}-{{ item[1] }}.j2" src: "edx/bin/{{ item[0] }}-{{ item[1] }}.j2"
dest: "{{ COMMON_BIN_DIR }}/{{ item[0] }}-{{ item[1] }}" dest: "{{ COMMON_BIN_DIR }}/{{ item[0] }}-{{ item[1] }}"
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
- install:configuration - install:configuration
# migrate when the migrate user is overridden in extra vars # migrate when the migrate user is overridden in extra vars
- name: migrate - name: Migrate
command: "{{ COMMON_BIN_DIR }}/edxapp-migrate-{{ item }}" command: "{{ COMMON_BIN_DIR }}/edxapp-migrate-{{ item }}"
when: migrate_db is defined and migrate_db|lower == "yes" and COMMON_MYSQL_MIGRATE_PASS and item != "lms-preview" when: migrate_db is defined and migrate_db|lower == "yes" and COMMON_MYSQL_MIGRATE_PASS and item != "lms-preview"
environment: environment:
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
- assets - assets
# Gather assets using paver if possible # Gather assets using paver if possible
- name: "gather {{ item }} static assets with paver" - name: "Gather {{ item }} static assets with paver"
command: "{{ COMMON_BIN_DIR }}/edxapp-update-assets-{{ item }}" command: "{{ COMMON_BIN_DIR }}/edxapp-update-assets-{{ item }}"
when: celery_worker is not defined and not devstack and item != "lms-preview" when: celery_worker is not defined and not devstack and item != "lms-preview"
with_items: "{{ service_variants_enabled }}" with_items: "{{ service_variants_enabled }}"
......
--- ---
- name: get instance information - name: Get instance information
action: ec2_facts action: ec2_facts
- name: tag instance with edx_platform version - name: Tag instance with edx_platform version
ec2_tag: ec2_tag:
resource: "{{ ansible_ec2_instance_id }}" resource: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"version:edx_platform" : "{{ edx_platform_repo }} {{ edxapp_platform_checkout.after|truncate(7,True,'') }}" "version:edx_platform" : "{{ edx_platform_repo }} {{ edxapp_platform_checkout.after|truncate(7,True,'') }}"
when: edxapp_platform_checkout.after is defined when: edxapp_platform_checkout.after is defined
- name: tag instance with edxapp theme version - name: Tag instance with edxapp theme version
ec2_tag: ec2_tag:
resource: "{{ ansible_ec2_instance_id }}" resource: "{{ ansible_ec2_instance_id }}"
region: "{{ ansible_ec2_placement_region }}" region: "{{ ansible_ec2_placement_region }}"
......
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