lotusnoir.apps_consul_agent
ansible-apps_consul_agent
Description
Install and configure consul agent
Requirements
none
Role variables
See variables for more details.
With default variables, this role assume you will just install consul agent binary. You need to set the config variables like in the exemple in order to configure agent and systemd.
Examples
Install agent with a node_exporter configuration
---
- hosts: apps_consul_agent
become: true
become_method: sudo
gather_facts: true
roles:
- role: ansible-apps_consul_agent
vars:
consul_agent_manage_config: true
consul_agent_systemd_args: '-advertise "{{ ansible_default_ipv4.address }}" -bind "{{ ansible_default_ipv4.address }}" -client "0.0.0.0" -datacenter "mysite" -retry-join "10.1.1.1"'
consul_client_config: |
data_dir = "{{ consul_agent_data_dir }}"
leave_on_terminate = false
disable_update_check = true
log_json = true
log_level = "warn"
consul_agent_config_d:
exporter:
services:
- name: node-exporter
port: 9100
tags:
- prometheus_exporter
checks:
- name: node-exporter-tcp
tcp: 127.0.0.1:9100
interval: 1s
timeout: 900ms
failures_before_critical: 3
License
This project is licensed under Apache License. See LICENSE for more details.
Author Information
Install
ansible-galaxy install lotusnoir.apps_consul_agentLicense
apache-2.0
Downloads
88
Owner
