Commit 57f07052 by ansible

no message

1 parent b49a8d29
Showing with 53 additions and 0 deletions
......@@ -212,5 +212,58 @@
owner: root
group: root
mode: 0644
- hosts: scgchat
become: true
vars:
dmapublishURL: 'publishUrl = https://scgchat.beebuddy.net'
wdchatpublishURL: https://scgchat.beebuddy.net
updateURL: https://scgchat.beebuddy.net:444/index.html
dmaserverName: 'server_name scgchat.beebuddy.net;'
wdchatserverName: 'server_name scgchat.beebuddy.net;'
hostName: wdchat
etcHost: '127.0.0.1 wdchatgateway localhost wdchatengine wdchat'
tasks:
- file:
path: /opt/stack/dma/conf/dmaconfig.properties
state: touch
mode: 0644
- name: Update DMA publish URL
copy: content="{{ dmapublishURL }}" dest=/opt/stack/dma/conf/dmaconfig.properties
- name: Update NginX DMA server name
copy: content="{{ dmaserverName }}" dest=/opt/stack/nginx/conf/dmadomain.conf
- name: Update NginX WDCHAT server name
copy: content="{{ wdchatserverName }}" dest=/opt/stack/nginx/conf/wdchatdomain.conf
- name: 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: Update Theme
expect:
command: /opt/stack/postgres/postgresql/bin/psql --host=127.0.0.1 --port=7432 --username=wdchat -d WDCHAT -f /tmp/scgchat/scg_wdchat_theme.sql
responses:
'Password for user wdchat': 'BBRyAPNh6g4H9qte'
- name: Configure hostname
hostname: name={{ hostName }}
- name: Configure /etc/hosts
lineinfile:
path: /etc/hosts
regexp: '^127\.0\.0\.1'
line: "{{ etcHost }}"
owner: root
group: root
mode: 0644
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!