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-client/tasks/main.yml

28 lines
724 B
YAML
Raw Normal View History

2020-11-12 22:56:55 +06:00
- name: "copy consul-client to destination server"
2020-01-24 18:01:59 +08:00
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"
2020-11-12 22:56:55 +06:00
dest: /opt/consul-client/script/consul_bind_ip_generate.sh
2020-01-24 18:01:59 +08:00
tags: template
- name: "Template config-client.json"
template:
src: "{{ role_path }}/templates/config-client.json.j2"
2020-11-12 22:56:55 +06:00
dest: /opt/consul-client/etc/consul/config-client.json
2020-01-24 18:01:59 +08:00
tags: template
2020-11-12 22:56:55 +06:00
- name: "Install consul-client"
shell: cd /opt/consul-client;sh install.sh
2020-01-24 18:01:59 +08:00
2020-11-12 22:56:55 +06:00
- name: "Start consul-client"
2020-01-24 18:01:59 +08:00
systemd:
2020-11-12 22:56:55 +06:00
name: consul-client
2020-01-24 18:01:59 +08:00
state: restarted
enabled: yes
daemon_reload: yes