Skip to content

Instantly share code, notes, and snippets.

@Doooooo0o
Doooooo0o / cgroups.conf.j2
Created March 29, 2016 15:23 — forked from DazWorrall/cgroups.conf.j2
Collecting cgroup memory stats using collectd and ansible
LoadPlugin "table"
<Plugin table>
{% for vm in running_vms.list_vms %}
<Table "/sys/fs/cgroup/memory/libvirt/lxc/{{ vm }}/memory.stat">
Instance "{{ vm }}-memory"
Separator " \\t"
<Result>
Type gauge
InstancesFrom 0
ValuesFrom 1
@Doooooo0o
Doooooo0o / include_vars_merged
Created December 1, 2015 15:33 — forked from udondan/include_vars_merged
Ansible action plugin "include_vars_merged". Same as "include_vars" but merges hashes instead of overriding

#Why? Current version of Ansible (1.7.1) does not merge hashes in the include_vars task even if told so via hash_behaviour = merge in your ansible.cfg. ansible/ansible#9116

This action plugin will merge hashes no matter how you have configured your hash_behaviour.

#How to setup: Save include_vars_merged.py to library/plugins/action/include_vars_merged.py

Save include_vars_merged to library/custom/include_vars_merged