-
Notifications
You must be signed in to change notification settings - Fork 1
/
tasks-consul.yml
36 lines (30 loc) · 949 Bytes
/
tasks-consul.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
---
# ansible-playbook -i hosts.yml tasks-consul.yml
# see https://docs.ansible.com/ansible/latest/search.html?q=consul&check_keywords=yes&area=default
- name: "tasks"
hosts: consul_instances
pre_tasks:
- name: Install pip
apt:
name: python3-pip
state: present
- name: Install python-consul
pip:
name: python-consul
state: present
tasks:
- name: register nginx with an http check
consul:
service_name: openresty
service_port: 8080
interval: 60s
http: http://localhost:8080/openresty_status
state: absent
tags:
- openresty
# luarocks install lua-resty-consul
# Installing https://luarocks.org/lua-resty-consul-0.2-0.src.rock
# lua-resty-consul 0.2-0 is now installed in /usr/local (license: MIT)
# cd /usr/local/openresty/lualib/resty
# opm get hamishforbes/lua-resty-consul
# cd /usr/local/openresty/site/lualib/resty