Line | |
---|
1 | --- |
---|
2 | # tasiks to enable munin stats on client node |
---|
3 | - name: install munin client packages |
---|
4 | apt: |
---|
5 | name: "{{ item }}" |
---|
6 | state: present |
---|
7 | with_items: |
---|
8 | - "munin-node" |
---|
9 | - "munin-common" |
---|
10 | - "munin-plugins-core" |
---|
11 | - "munin-plugins-extra" |
---|
12 | |
---|
13 | - name: enable remote host ipv4 |
---|
14 | lineinfile: |
---|
15 | dest: "/etc/munin/munin-node.conf" |
---|
16 | regexp: "^allow \\^{{ munin_server_ipv4 }}\\$" |
---|
17 | insertafter: "^allow .*" |
---|
18 | line: "allow ^{{ munin_server_ipv4 }}$" |
---|
19 | backup: yes |
---|
20 | state: present |
---|
21 | |
---|
22 | - name: enable remote host ipv6 |
---|
23 | lineinfile: |
---|
24 | dest: "/etc/munin/munin-node.conf" |
---|
25 | regexp: "^allow \\^{{ munin_server_ipv6 }}\\$" |
---|
26 | insertafter: "^allow .*" |
---|
27 | line: "allow ^{{ munin_server_ipv6 }}$" |
---|
28 | state: present |
---|
29 | |
---|
30 | - name: set host name in conf |
---|
31 | lineinfile: |
---|
32 | dest: "/etc/munin/munin-node.conf" |
---|
33 | regexp: "^host_name" |
---|
34 | insertafter: "^#host_name .*" |
---|
35 | line: "host_name {{ inventory_hostname }}" |
---|
36 | state: present |
---|
Note: See
TracBrowser for help on using the repository browser.