ansible-london-meetup icon indicating copy to clipboard operation
ansible-london-meetup copied to clipboard

Test Ansible playbooks using Assert

Open dmccuk opened this issue 2 years ago • 3 comments

Talk title

How to prove Ansible did what it said it did!

Talk Description

When we run Ansible to manage server configurations, we assume (if there is no red errors) that it worked. But if you're developing ansible modules for your systems, and want to take the DevOps approach and work on CICD pipelines, you need to have some tests in there to prove that what you asked ansible to do has actually worked.

One of the best ways to do this within ansible, is to use the Assert module. It asserts that a given expression is true. When you combine this with the output of a command that’s registered to a variable, there is almost no limit to what you can test.

Estimated Duration

15 mins - no more than 20.

Twitter Handle

LinkedIn? https://www.linkedin.com/in/dennismccarthyuk/

Sponsorship

I'm just a guy who likes doing stuff with Ansible

dmccuk avatar Aug 20 '21 07:08 dmccuk

@dmccuk This would be a great topic, thank you. Do you think we could fit in a virtual meetup before AnsibleFest (ie early September)?

gundalow avatar Aug 20 '21 08:08 gundalow

Yes I think there's time. I was planning to run my own meetup in the second week of September

But I'd be up for waiting and doing an in person one as well if that was a possibility in October?

On Fri, 20 Aug 2021, 09:13 John R Barker, @.***> wrote:

@dmccuk https://github.com/dmccuk This would be a great topic, thank you. Do you think we could fit in a virtual meetup before AnsibleFest (ie early September)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ansible-community/ansible-london-meetup/issues/74#issuecomment-902518667, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX4XDICJ5ZK6AGREVHOORTT5YFDJANCNFSM5CPYW5PA .

dmccuk avatar Aug 20 '21 08:08 dmccuk

@gundalow How's the planning going for the next meetup. I'm not sure if you saw my previous reply but I'm ready when you are to give a presentation on testing Ansible playbooks using Assert.

dmccuk avatar Oct 06 '21 09:10 dmccuk