30 lines
867 B
YAML
30 lines
867 B
YAML
- name: "copy consul-external 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-external/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-external/etc/consul/config-server.json
|
|
src: "{{ role_path }}/templates/config-client.json.j2"
|
|
dest: /opt/consul-external/etc/consul/config-client.json
|
|
tags: template
|
|
|
|
- name: "Install consul-external"
|
|
shell: cd /opt/consul-external;sh install.sh
|
|
|
|
- name: "Start consul-external"
|
|
systemd:
|
|
name: consul-server-external
|
|
state: restarted
|
|
enabled: yes
|
|
daemon_reload: yes
|