Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sivel/ansible-memory-profiler
Docker image to aid in memory profiling an ansible playbook using cgroups
https://github.com/sivel/ansible-memory-profiler
Last synced: 19 days ago
JSON representation
Docker image to aid in memory profiling an ansible playbook using cgroups
- Host: GitHub
- URL: https://github.com/sivel/ansible-memory-profiler
- Owner: sivel
- License: gpl-3.0
- Created: 2018-04-30T16:45:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-30T21:21:26.000Z (over 6 years ago)
- Last Synced: 2024-10-03T23:41:11.413Z (about 1 month ago)
- Language: Python
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](http://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#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.