Last change
on this file since 17217 was
16036,
checked in by uli, 5 years ago
|
Modernize munin-client role.
With recent ansible versions lists of items are the prefered way to indicate
sets of packages and similar.
|
File size:
974 bytes
|
Rev | Line | |
---|
[14930] | 1 | --- |
---|
| 2 | # tasiks to enable munin stats on client node |
---|
| 3 | - name: install munin client packages |
---|
| 4 | apt: |
---|
[16036] | 5 | name: [ |
---|
| 6 | "munin-node", |
---|
| 7 | "munin-common", |
---|
| 8 | "munin-plugins-core", |
---|
| 9 | "munin-plugins-extra", |
---|
| 10 | "lm-sensors"] |
---|
[14930] | 11 | state: present |
---|
| 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.