diff --git a/.travis.yml b/.travis.yml index 429cec0a6..6cefc42eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,7 +97,7 @@ jobs: - ssh ec2-user@$control_machine_ip "source ~/.bash_profile;pip install --upgrade awscli 'molecule-ec2';" - ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule destroy -s ec2" - ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule create -s ec2" - - ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;sudo setenforce 0; ansible-playbook playbooks/acs.yml -i /opt/buildacs/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/alfresco-ansible-deployment/molecule_temp_dir/inventory/ansible_inventory.yml" + - ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;ansible-playbook playbooks/acs.yml -i /opt/buildacs/$TRAVIS_BRANCH/$TRAVIS_BUILD_NUMBER/alfresco-ansible-deployment/molecule_temp_dir/inventory/ansible_inventory.yml" - echo "wait for repo to be up" && sleep 5m - ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;molecule verify -s ec2" - export TESTHOST=$(ssh ec2-user@$control_machine_ip "$COMMON_COMMANDS;cat molecule_temp_dir/instance_config.yml | yq .[].address -r") diff --git a/roles/adw/tasks/main.yml b/roles/adw/tasks/main.yml index 38d756bde..7a9167e7a 100644 --- a/roles/adw/tasks/main.yml +++ b/roles/adw/tasks/main.yml @@ -12,9 +12,9 @@ mode: '0755' when: not adw_zip.stat.exists -- name: Create "{{ nginx_folder }}/digital-workspace/" dir +- name: Create "{{ nginx_folder }}/{{ request_uri }}/" dir file: - path: "{{ nginx_folder }}/digital-workspace/" + path: "{{ nginx_folder }}/{{ request_uri }}/" state: directory mode: '0755' when: not adw_zip.stat.exists @@ -35,8 +35,8 @@ become: yes unarchive: src: "{{ temp_dir }}/alfresco-digital-workspace-{{ adwVersion }}.zip" - dest: "{{ nginx_folder }}/digital-workspace/" + dest: "{{ nginx_folder }}/{{ request_uri }}/" remote_src: yes - creates: "{{ nginx_folder }}/digital-workspace/app.config.json" + creates: "{{ nginx_folder }}/{{ request_uri }}/app.config.json" - include_tasks: nginx.yml \ No newline at end of file diff --git a/roles/adw/templates/alfresco_adw.conf b/roles/adw/templates/alfresco_adw.conf index 7dd2af3d1..44b883a25 100644 --- a/roles/adw/templates/alfresco_adw.conf +++ b/roles/adw/templates/alfresco_adw.conf @@ -8,7 +8,7 @@ server { proxy_pass_header Set-Cookie; location / { - root {{ nginx_folder }}/digital-workspace/; + root {{ nginx_folder }}/{{ request_uri }}/; index index.html index.htm; } } diff --git a/roles/adw/vars/main.yml b/roles/adw/vars/main.yml index 282391724..61deb10e9 100644 --- a/roles/adw/vars/main.yml +++ b/roles/adw/vars/main.yml @@ -2,3 +2,4 @@ nginx_package_name: "nginx" nginx_folder: "/usr/share/nginx/html" temp_dir: "/tmp/digital_workspace" +request_uri: "digital-workspace"