Commit 9fc0c469 by Edward Zarecor

adding cidr support

parent 2b22fb85
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
# code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions # code style: https://github.com/edx/configuration/wiki/Ansible-Coding-Conventions
# license: https://github.com/edx/configuration/blob/master/LICENSE.TXT # license: https://github.com/edx/configuration/blob/master/LICENSE.TXT
# #
## #
# Defaults for role munin-node # Defaults for role munin-node
# #
MUNIN_MONITOR_CIDR: 127.0.0.1/32
# #
# vars are namespaced with the module name. # vars are namespaced with the module name.
# #
...@@ -23,6 +23,7 @@ munin_node_role_name: munin-node ...@@ -23,6 +23,7 @@ munin_node_role_name: munin-node
munin_node_debian_pkgs: munin_node_debian_pkgs:
- "munin-node" - "munin-node"
- "sysstat" - "sysstat"
- "libnet-cidr-perl"
munin_node_redhat_pkgs: [] munin_node_redhat_pkgs: []
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
# #
# Example play: # Example play:
# #
# ansible-playbook -u e0d -i '10.2.91.79,10.2.92.37,10.2.90.108,' ./run_role.yml -e "role=munin_node"
# #
- name: install OS packages - name: install OS packages
...@@ -50,6 +51,15 @@ ...@@ -50,6 +51,15 @@
dest="/etc/munin/plugin-conf.d/munin-edx" dest="/etc/munin/plugin-conf.d/munin-edx"
owner=root group=root mode="644" owner=root group=root mode="644"
#
# Assumes a single allow line
#
- name: add source cidr
lineinfile:
dest=/etc/munin/munin-node.conf
regexp='^cidr_allow'
line='cidr_allow {{ MUNIN_MONITOR_CIDR }}'
- name: restart munin-mode - name: restart munin-mode
service: > service: >
name=munin-node name=munin-node
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment