Skip to content

Docker image to aid in memory profiling an ansible playbook using cgroups

License

Notifications You must be signed in to change notification settings

sivel/ansible-memory-profiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-memory-profiler

This Docker image was created to aid in memory profiling an Ansible playbook using the cgroup_memory_recap callback plugin on a system without access to cgroups

Using

docker run --rm -ti --privileged \
    -v /path/to/playbook_dir:/playbook \
    -v /path/to/ansible/source:/ansible \
    sivel/ansible-memory-profiler \
    ansible-playbook -v -i /playbook/hosts /playbook/playbook.yml

Notes

ansible directory

This image assumes that /ansible will be mounted, and should be the path to the Ansible source. It will be used following the Running from Source instructions. If /ansible is not mounted, you will presented with an error.

playbook directory

The /playbook directory can be whatever you want, I've just used it as an easy to follow convention.

cgroup_memory_recap callback plugin

This is the same callback plugin that will be included in Ansible 2.6.0, but bundled here for use in earlier Ansible versions.

Why?

I develop on a Mac, and as such I don't have direct access to cgroups, but I do have access to Docker. This image gives easy access to use cgroup based memory profiling locally, with little hoops to jump through.

About

Docker image to aid in memory profiling an ansible playbook using cgroups

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published