This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangzhihan-device-manageme…/roles/consul-cluster/tasks/main.yml
2020-01-24 17:55:06 +08:00

28 lines
738 B
YAML

- name: "copy consul-cluster to destination server"
copy:
src: "{{ role_path }}/files/"
dest: /opt
mode: 0755
- name: "Template consul_bind_ip_generate.sh"
template:
src: "{{ role_path }}/templates/consul_bind_ip_generate.sh.j2"
dest: /opt/consul-cluster/script/consul_bind_ip_generate.sh
tags: template
- name: "Template config-server.json"
template:
src: "{{ role_path }}/templates/config-server.json.j2"
dest: /opt/consul-cluster/etc/consul/config-server.json
tags: template
- name: "Install consul-cluster"
shell: cd /opt/consul-cluster;sh install.sh
- name: "Start consul-cluster"
systemd:
name: consul-server-cluster
state: restarted
enabled: yes
daemon_reload: yes