tk1_config.sh
828 Bytes
#!/bin/bash
GROUP="tk1_sn"
ansible $GROUP -s -m raw -a "sed -i 's/^name.*/name: \"{{ inventory_hostname }}\"/g' /root/UserApp/filebeat_app/filebeat.yml"
ansible $GROUP -s -m raw -a "sed -i 's/192.168.9.112:9200/192.178.3.2:9200/g' /root/UserApp/filebeat_app/filebeat.yml"
ansible $GROUP -s -m raw -a "sed -i 's/Server=192.168.8.133/Server=192.178.3.2/g' /usr/local/etc/zabbix_agentd.conf"
ansible $GROUP -s -m raw -a "sed -i 's/ServerActive=192.168.8.133/ServerActive=192.178.3.2/g' /usr/local/etc/zabbix_agentd.conf"
ansible $GROUP -s -m raw -a "sed -i 's/^Hostname=.*/Hostname=tk1_gongsi/g' /usr/local/etc/zabbix_agentd.conf"
ansible $GROUP -s -m raw -a "service supervisor restart"
# ansible starnet_master -s -m raw -a "sed -i 's/192.168.9.133:9200/192.168.9.112:9200/g' /etc/haproxy/haproxy.cfg; service haproxy restart"