Commit f6107533 by ansible

Add "Configure /etc/hosts" action

Add "Configure hostname" action
1 parent 4c6a2123
Showing with 17 additions and 2 deletions
......@@ -73,6 +73,7 @@
updateURL: https://bpchat.beebuddy.net:444/index.html
dmaserverName: 'server_name bpdma.beebuddy.net;'
wdchatserverName: 'server_name bpchat.beebuddy.net;'
hostName: wdchat
tasks:
- file:
path: /opt/stack/dma/conf/dmaconfig.properties
......@@ -96,4 +97,18 @@
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'
\ No newline at end of file
'Password for user wdchat': 'BBRyAPNh6g4H9qte'
- name: Edit hostname
hostname: name={{ hostName }}
- name: Configure /etc/hosts
lineinfile:
dest: /etc/hosts
state: present
backrefs: yes
regexp: "{{ item.reg }}"
line: "{{ item.line }}"
with_items:
- { reg: '^(127.0.0.1).*', line: \1 wdchatgateway localhost wdchatengine {{ hostName }} }
tags: reg
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!