dma.yml 2.27 KB
- name: Begin Deploy DMA - iChat
  shell: cp /tmp/application/{{ app_version }}/iChat-*.war /opt/stack/runtime/wildfly/standalone/deployments/iChat.war
- name: Process Deploy DMA - serviceGateway
  shell: cp /tmp/application/{{ app_version }}/serviceGateway-*.war /opt/stack/runtime/wildfly/standalone/deployments/serviceGateway.war
- name: Process Deploy DMA - dmaManager
  shell: cp /tmp/application/{{ app_version }}/dmaManager-*.war /opt/stack/runtime/wildfly/standalone/deployments/dmaManager.war
- name: Process Deploy DMA - dmaEngine
  shell: cp /tmp/application/{{ app_version }}/dmaEngine-*.war /opt/stack/runtime/wildfly/standalone/deployments/dmaEngine.war
- name: End Deploy DMA - ims
  shell: cp /tmp/application/{{ app_version }}/ims-*.war /opt/stack/runtime/wildfly/standalone/deployments/ims.war

- name: Begin Reconfigure Customer Environment - Create properties file   
  file:
     path: /opt/stack/dma/conf/dmaconfig.properties
     state: touch
     mode: 0644  
- name: Begin Reconfigure Customer Environment - Update NginX DMA server name
  copy: content="{{ dmaserverName }}" dest=/opt/stack/nginx/conf/dmadomain.conf

- name: Reconfigure Customer Environment - Update NginX WDCHAT server name
  copy: content="{{ wdchatserverName }}" dest=/opt/stack/nginx/conf/wdchatdomain.conf

- name: Reconfigure Customer Environment - Update publish url
  expect:
    command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -c "update wd_sys_config set sys_value = '{{ wdchatpublishURL }}' where sys_group ='system' and sys_key = 'publish_url'"
    responses:
        'Password for user wdchat': 'BBRyAPNh6g4H9qte'

- name: Update application download url
  expect:
    command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -c "update wd_sys_config set sys_value = '{{ updateURL }}' where sys_group ='appversion' and sys_key = 'update_url'"
    responses:
        'Password for user wdchat': 'BBRyAPNh6g4H9qte'

- name: Reconfigure Customer Environment - Configure hostname
  hostname: name={{ hostName }}

- name: Reconfigure Customer Environment - Configure /etc/hosts
  lineinfile:
    path: /etc/hosts
    regexp: '^127\.0\.0\.1'
    line: "{{ etcHost }}"
    owner: root
    group: root
    mode: 0644