3 ms·
I found myself doing the same thing for Ansible. The problem I ran into was where I wanted to test service restarting in a systemd based environment. Older rel
by bazfoo 11y ago
I found myself doing the same thing for Ansible.
The problem I ran into was where I wanted to test service restarting in a systemd based environment. Older releases using sysvinit work perfectly fine.
- eropple 11y agoThis is a major problem with the now-in-vogue use of Docker for testing this sort of thing, yes. They aren't replacements for a virtual machine, and testing against something that doesn't even resemble the deployment environment is wacky to me.
- arianvanp 11y agoThis is why you should check out systemd-nspawn. It was designed especially for this use case. Also. If you're on upstart, give lxc a shot. We currently test our ansible scripts by deploying to lxc by giving each container a static IP in a bridged network to simulate our production environment. Just swap ansible inventory files. Works like a charm.
- glenjamin 11y agoThis gist works with test-kitchen to run systemd in a centos 7-based container. It should be simple enough to adjust to run ansible. https://gist.github.com/glenjamin/2d04e9c2a163c7848173 https://gist.github.com/glenjamin/2d04e9c2a163c7848173