forked from evolix/ansible-roles
kvm-host: better syntax
This commit is contained in:
parent
7e9065e172
commit
eb1a71f96c
|
@ -1,33 +1,34 @@
|
||||||
---
|
---
|
||||||
- file:
|
- name: Create Munin plugins directory
|
||||||
path: '/usr/local/share/munin/plugins/'
|
file:
|
||||||
|
path: "/usr/local/share/munin/plugins/"
|
||||||
state: directory
|
state: directory
|
||||||
mode: 02755
|
mode: 02755
|
||||||
|
|
||||||
- name: Get Munin plugins
|
- name: Get Munin plugins
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/virtualization/{{ item }}"
|
url: "https://raw.githubusercontent.com/munin-monitoring/contrib/master/plugins/virtualization/{{ item }}"
|
||||||
dest: '/usr/local/share/munin/plugins/'
|
dest: "/usr/local/share/munin/plugins/"
|
||||||
mode: 0755
|
mode: 0755
|
||||||
with_items:
|
with_items:
|
||||||
- 'kvm_cpu'
|
- kvm_cpu
|
||||||
- 'kvm_io'
|
- kvm_io
|
||||||
- 'kvm_mem'
|
- kvm_mem
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
||||||
- name: Activate Munin plugins
|
- name: Activate Munin plugins
|
||||||
file:
|
file:
|
||||||
src: "/usr/local/share/munin/plugins/{{ item }}"
|
src: "/usr/local/share/munin/plugins/{{ item }}"
|
||||||
dest: "/etc/munin/plugins/{{ item }}"
|
dest: "/etc/munin/plugins/{{ item }}"
|
||||||
state: link
|
state: link
|
||||||
with_items:
|
with_items:
|
||||||
- 'kvm_cpu'
|
- kvm_cpu
|
||||||
- 'kvm_io'
|
- kvm_io
|
||||||
- 'kvm_mem'
|
- kvm_mem
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
||||||
- name: Copy Munin plugins conf
|
- name: Copy Munin plugins conf
|
||||||
copy:
|
copy:
|
||||||
src: files/munin-plugins
|
src: files/munin-plugins
|
||||||
dest: '/etc/munin/plugin-conf.d/kvm'
|
dest: "/etc/munin/plugin-conf.d/kvm"
|
||||||
notify: restart munin-node
|
notify: restart munin-node
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Install dependency
|
- name: Install packages for kvm/libvirt
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Reference in a new issue