- hosts: ~tag_Name_{{machine}}_{{ env }}
  pre_tasks:
  - fail: msg="This playbook only runnable on 'app' machines"
    when: "'app' not in machine"
  sudo: True
  vars:
    secure_dir: '../../../edx-secret/ansible'
    local_dir:  '../../../edx-secret/ansible/local'
    not_prod: false
  vars_files:
    - "{{ secure_dir }}/vars/common/edxapp.yml"
    - "{{ secure_dir }}/vars/edxapp_{{ env }}_vars.yml"
    - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
    - "{{ secure_dir }}/vars/shib_{{ env }}_vars.yml"
  roles:
    - common
    - supervisor
    - role: user
      tags: users
    - role: nginx
      nginx_sites:
        - lms
        - cms
        - verify
      nginx_template_directory: "{{local_dir}}/nginx/templates/"
      nginx_default_sites:
        - lms
      tags: nginx
    - edxapp
    - apache
    - shibboleth

- hosts: ~tag_Name_{{machine}}_{{ env }}
  pre_tasks:
  - fail: msg="This playbook only runnable on 'app' machines"
    when: "'app' not in machine"
  sudo: True
  vars:
    secure_dir: '../../../edx-secret/ansible'
    local_dir:  '../../../edx-secret/ansible/local'
    not_prod: false
  vars_files:
    - "{{ secure_dir }}/vars/common/edxapp.yml"
    - "{{ secure_dir }}/vars/edxapp_{{ env }}_vars.yml"
    - "{{ secure_dir }}/vars/edxapp_prod_users.yml"
    - "{{ secure_dir }}/vars/shib_{{ env }}_vars.yml"
  roles:
    - common
    - supervisor
    - role: user
      tags: users
    - role: nginx
      nginx_sites:
        - lms
        - cms
        - lms-preview
        - verify
      nginx_template_directory: "{{local_dir}}/nginx/templates/"
      nginx_default_sites:
        - lms
      tags: nginx
    - edxapp
    - apache
    - shibboleth

Add lms-preview to nginx for suclass
Add lms-preview to nginx for suclass
