Simplify netdata network access
This commit is contained in:
parent
0f805168b6
commit
9b47271a10
@ -2,16 +2,13 @@
|
||||
argument_specs:
|
||||
main:
|
||||
options:
|
||||
system_extra_netdata_inet_address:
|
||||
system_extra_netdata_bind_socket_to:
|
||||
type: "str"
|
||||
required: true
|
||||
system_extra_netdata_inet6_address:
|
||||
type: "str"
|
||||
required: true
|
||||
system_extra_netdata_registry_enabled:
|
||||
system_extra_netdata_stream_parent:
|
||||
type: "bool"
|
||||
required: true
|
||||
system_extra_netdata_registry_url:
|
||||
system_extra_netdata_stream_dest_inet6:
|
||||
type: "str"
|
||||
required: true
|
||||
system_extra_netdata_stream_api_key:
|
||||
|
@ -11,18 +11,6 @@
|
||||
name: "netdata"
|
||||
enabled: true
|
||||
|
||||
- name: "resolve netdata registry via hosts file (inet)"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "/etc/hosts"
|
||||
line: "{{ system_extra_netdata_registry_inet_address }} {{ system_extra_netdata_registry_url }}"
|
||||
insertafter: "EOF"
|
||||
|
||||
- name: "resolve netdata registry via hosts file (inet6)"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "/etc/hosts"
|
||||
line: "{{ system_extra_netdata_registry_inet6_address }} {{ system_extra_netdata_registry_url }}"
|
||||
insertafter: "EOF"
|
||||
|
||||
- name: "configure netdata"
|
||||
ansible.builtin.template:
|
||||
src: "./netdata.conf"
|
||||
|
@ -16,8 +16,4 @@
|
||||
web files group = root
|
||||
# Netdata is not designed to be exposed to potentially hostile
|
||||
# networks. See https://github.com/netdata/netdata/issues/164
|
||||
bind socket to IP = {{ system_extra_netdata_inet_address }} {{ system_extra_netdata_inet6_address }}
|
||||
|
||||
[registry]
|
||||
enabled = {{ 'yes' if system_extra_netdata_registry_enabled else 'no' }}
|
||||
registry to announce = {{ system_extra_netdata_registry_url }}:19999
|
||||
bind socket to IP = {{ system_extra_netdata_bind_socket_to }}
|
||||
|
@ -5,7 +5,7 @@
|
||||
# number of hosts.
|
||||
#
|
||||
# You can generate API keys, with the linux command: uuidgen
|
||||
{% if not system_extra_netdata_registry_enabled %}
|
||||
{% if not system_extra_netdata_stream_parent %}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 1. ON CHILD NETDATA - THE ONE THAT WILL BE SENDING METRICS
|
||||
@ -30,7 +30,7 @@
|
||||
# the Netdata will encrypt the connection with the parent.
|
||||
#
|
||||
# This communication is not HTTP (it cannot be proxied by web proxies).
|
||||
destination = tcp:{{ system_extra_netdata_registry_url }}:19999
|
||||
destination = tcp:[{{ system_extra_netdata_stream_dest_inet6 }}]:19999
|
||||
|
||||
# Skip Certificate verification?
|
||||
# The netdata child is configurated to avoid invalid SSL/TLS certificate,
|
||||
@ -89,7 +89,7 @@
|
||||
# It is ignored when replication is enabled
|
||||
initial clock resync iterations = 60
|
||||
{% endif %}
|
||||
{% if system_extra_netdata_registry_enabled %}
|
||||
{% if system_extra_netdata_stream_parent %}
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 2. ON PARENT NETDATA - THE ONE THAT WILL BE RECEIVING METRICS
|
||||
|
Loading…
Reference in New Issue
Block a user