- name: Deploy edxapp
  hosts: all
  sudo: True
  gather_facts: True
  vars:
    serial_count: 1
    CLUSTER_NAME: 'edxapp'
  serial: "{{ serial_count }}"
  roles:
    - aws
    - role: scorm
      when: "{{ EDXAPP_XBLOCK_SETTINGS.ScormXBlock }}"
    - role: nginx
      nginx_sites:
      - lms
      - cms
      nginx_default_sites:
      - lms
      nginx_extra_sites: "{{ NGINX_EDXAPP_EXTRA_SITES }}"
      nginx_extra_configs: "{{ NGINX_EDXAPP_EXTRA_CONFIGS }}"
      nginx_redirects: "{{ NGINX_EDXAPP_CUSTOM_REDIRECTS }}"
    - edxapp
    - role: datadog
      when: COMMON_ENABLE_DATADOG
    - role: splunkforwarder
      when: COMMON_ENABLE_SPLUNKFORWARDER
    - role: newrelic
      when: COMMON_ENABLE_NEWRELIC
    - role: minos
      when: COMMON_ENABLE_MINOS

- name: Deploy edxapp
  hosts: all
  sudo: True
  gather_facts: True
  vars:
    serial_count: 1
    CLUSTER_NAME: 'edxapp'
  serial: "{{ serial_count }}"
  roles:
    - aws
    - role: scorm
      when: "{{ EDXAPP_XBLOCK_SETTINGS }}.get('ScormXBlock', False)"
    - role: nginx
      nginx_sites:
      - lms
      - cms
      nginx_default_sites:
      - lms
      nginx_extra_sites: "{{ NGINX_EDXAPP_EXTRA_SITES }}"
      nginx_extra_configs: "{{ NGINX_EDXAPP_EXTRA_CONFIGS }}"
      nginx_redirects: "{{ NGINX_EDXAPP_CUSTOM_REDIRECTS }}"
    - edxapp
    - role: datadog
      when: COMMON_ENABLE_DATADOG
    - role: splunkforwarder
      when: COMMON_ENABLE_SPLUNKFORWARDER
    - role: newrelic
      when: COMMON_ENABLE_NEWRELIC
    - role: minos
      when: COMMON_ENABLE_MINOS

Fix conditional on scorm role
Fix conditional on scorm role
