Mitigate very long ansible-playbook runs

21 views
Skip to first unread message

jepper

unread,
Jun 28, 2019, 5:29:57 AM6/28/19
to Ansible Project
I'm working on a project where typical ansible-playbook runs take a considerable amount of time - 3 hours at least, to refresh a small test environment. Be under no illusion we're "doing it right" - we're not. None the less, I'm tasked with making it all go faster, and I'm not in a position to change the architecture significantly.

I'm thinking of coming up with a process that compares a previously generated "state file" with the target host, using checksums on files handled by ansbile, git sha's from the role repository and the playbook repository, evaluation ansible-playbook version and extra-vars supplied on the command line. This would result in a bunch of either tags or skip-tags, in turn applied to ansible-playbook. It would be implemented as a wrapper script that will execute ansible-playbook.

Does something like this exist?
If you have an opinion on this approach, please share. I'm thick skinned.

Kai Stian Olstad

unread,
Jun 28, 2019, 1:03:21 PM6/28/19
to ansible...@googlegroups.com
On 28.06.2019 11:29, jepper wrote:
> I'm working on a project where typical ansible-playbook runs take a
> considerable amount of time - 3 hours at least, to refresh a small test
> environment. Be under no illusion we're "doing it right" - we're not. None
> the less, I'm tasked with making it all go faster, and I'm not in a
> position to change the architecture significantly.

You might want to check out Mitogen[1], depending on why your playbook is slow you might get considerable speedup.

[1] https://networkgenomics.com/ansible/


--
Kai Stian Olstad

Brian Coca

unread,
Jun 28, 2019, 1:07:12 PM6/28/19
to Ansible Project
I would look at this post
https://www.ansible.com/blog/ansible-performance-tuning

Also check the latest versions of Ansible, we have been removing a lot
of bottlenecks.


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages