wdchat.yml 2.56 KB
- name: Begin Deploy WDCHAT - iChat
  command: cp /tmp/application/{{ app_version }}/iChat-*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCHAT - serviceGateway
  command: cp /tmp/application/{{ app_version }}/serviceGateway-*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - dmaManager
  command: cp /tmp/application/{{ app_version }}/dmaManager-*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - dmaEngine
  command: cp /tmp/application/{{ app_version }}/dmaEngine-*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - ExAuthenWS
  command: cp /tmp/application/{{ app_version }}/ExAuthenWS*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - iAuthen
  command: cp /tmp/application/{{ app_version }}/iAuthen*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - iChatGateway
  command: cp /tmp/application/{{ app_version }}/iChatGateway*.war /opt/stack/runtime/wildfly/standalone/deployments/.
- name: Deploy WDCAT - iChatManagement
  command: cp /tmp/application/{{ app_version }}/iChatManagement*.war /opt/stack/admin/wildfly/standalone/deployments/.

  vars:
        dmapublishURL: 'publishUrl = https://{{ app_fqdn }}'
        wdchatpublishURL: https://{{ app_fqdn }}
        updateURL: https://{{ app_fqdn }}:444/index.html
        dmaserverName: 'server_name {{ app_fqdn }};'
        wdchatserverName: 'server_name {{ app_fqdn }};'
        hostName: wdchat
        etcHost: '127.0.0.1 wdchatgateway localhost wdchatengine wdchat'
- 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