-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[section_request] Testing Ansible playbooks and roles with Molecule + ansible-lint #101
Comments
Good question. The Molecule project has had a lot of uptake, and is definitely somewhat of a standard (even though I don't currently use it, ha!) for Ansible testing... I will consider it. [2020 edit: now I use it everywhere, even for collections!] |
Yes. I will be working on it soon :) I've been slowly moving some of my roles over to using Molecule instead of my home-grown solution, for example: |
Sheesh, and a few of my roles (like Jenkins, Kibana, and Kubernetes) have soaked up an entire evening. It's slow progress, but I've learned a good deal about Molecule, and how some of my earlier tests were not quite up to my own standards! I think I'll make a more informal blog post first (hopefully published around AnsibleFest week, as I get bored of practicing my slides...), then convert that into a good, tested section in the book, hopefully before end of year! |
Here's the promised blog post: Testing your Ansible roles with Molecule |
And here's a blog post on using Molecule to test Ansible Collections. I promise, I'll get some of this content into the book soon :) |
Perfect @geerlingguy! |
And a good presentation on Molecule (the basics) from #cfgmgmt2020 https://cfp.cfgmgmtcamp.be/media/molecule_cfgmgmt2020.pdf |
People seem to keep requesting this quite frequently. I think I'll try to get the testing chapter rewritten post-haste! |
Working on this... note that I'm thinking of covering this (ansible-lint + molecule) in the 7th episode of Ansible 101. |
Also wanted to give a shout out to @loganmarchione for this reddit post mentioning How and why you should lint your Ansible playbooks. |
While working on a full rewrite of the new chapter 12 tonight (I bumped 12/13/14 to 13/14/15 and extracted testing into its own chapter), I ran into an issue with So for |
Also opened up an issue in the Molecule repo: Fix getting-started docs - Dockerfile no longer shipped by default. I can't resist! |
Very close to finishing up the majority of this chapter, but I had to finish up prep work for tomorrow's live stream (see #257)—anyone following this issue should check out the live video (https://www.youtube.com/watch?v=FaXVZ60o8L8) or watch it on demand later... I'll cover a little more depth in the book, but the video should be a good preview of what's coming in the next book version! |
Issue #101: Add molecule testing example.
I have the example committed, and most of the chapter rewritten. I'll probably post a new version of the book next week. Moving the last portion of this work—using Molecule in a GitHub Actions workflow—into a separate issue. |
Split out the GitHub Actions for CI workflows into #264. Closing this issue. For those interested, this topic is also being covered in my free / live / on-demand Ansible 101 series on YouTube: |
No description provided.
The text was updated successfully, but these errors were encountered: