This post was originally published on the
XLAB Steampunk blog.
Don’t you wish you had a little helper by your side to spot elusive errors when writing Ansible Playbooks? Or anticipate potential problems playbooks might cause when you run them? Well, now you do!
Steampunk Spotter is an assisted automation writing tool that analyzes and enhances your Ansible Playbooks to help you simplify and speed up your automation with improved playbooks that guarantee reliable execution.
Spotter analyzes your playbooks and provides recommendations to avoid undesirable results. It helps you understand what happens when you run the playbooks to identify potential issues before they are executed. All of this helps you create high-quality playbooks that ensure reliable automation execution, reduce development and testing time, and minimize security risks, downtime, and costs.
Features: What does Spotter check?
Spotter helps you check:
Best practices: Structure your playbooks for readability, collaboration and ease of use, and avoid common playbook anti-patterns.
Errors: Rely on the assistant that will guide you through hidden obstacles causing hard-to-catch and time-consuming errors.
Modules: Identify name changes and redirects, check for fully qualified names, and ensure you are using certified and approved modules.
Parameters: Make sure you are using correct parameters, considering their relationships, and quickly identify invalid configurations.
Use case: Easily upgrade to the latest Ansible version
The tool is particularly useful for simplifying the Ansible upgrade process. It’s important to keep your Ansible environment up to date, especially since Ansible updates in many cases include several security fixes that make your deployment more secure and reliable. But it can be quite a lot to keep up with the new features and perform the upgrade process.
With Spotter, you can check if your playbooks are compatible with the latest Ansible version, see the problems they might cause, and get advice on what to do to avoid downtime and ease your migrations between versions.
Who is Steampunk Spotter for?
Development, Quality Assurance and Operations teams will find Steampunk Spotter as an invaluable tool for assisted playbook writing, simplified Ansible upgrades, and achieving reliable, secure, and trustworthy automation.
Playbook Developers can use it to verify playbook templates or examples, check Ansible core and Collection versions compatibility, and understand the implications of Ansible upgrades.
Quality Assurance Managers can use it to understand what will happen when you run the playbook, run QA automations without errors, understand best practices and what-if scenarios for your tests.
Operations Managers can use it to identify potential vulnerabilities, receive quality reports and recommendations for improvements, and achieve reliable execution of automation.
How can you use Spotter?
With Spotter, you can currently scan your Ansible content via the Spotter CLI tool, via the Spotter app, or in GitHub, but we’re already working on supporting additional integrations to further simplify your work. So, for now, you can choose between these three scanning options:
- you can scan local playbooks using the CLI tool,
- you can scan public Git repositories with the Spotter app,
- you scan playbooks in GitHub using the GitHub Actions integration.
If you’re a tech-savvy playbook writer and develop your playbooks in the terminal, you most likely want to check their quality right on the spot, which you can do with the Spotter CLI tool. See how in this blog post.
The CLI tool also offers a welcome rewrite feature that allows you to apply suggested corrections automatically, saving you extra time and effort. To quickly apply fixes to your playbooks, run the optional –rewrite/-r argument, which allows you to automatically rewrite your Ansible content with the suggested changes after scanning, if you choose to do so.
If you want to check the quality of public Git repositories, you can do so with the Spotter app.
And if you’re used to using GitHub, you’ll be happy to hear that you can integrate Steampunk Spotter with your GitHub repository. Spotter GitHub Action allows you to scan your Ansible content within GitHub’s CI/CD workflows.
Learn more about how to scan different content in the quick start guide.
The Spotter app: Track progress & collaborate with your team
Whether you scan your content via CLI, the app, or in GitHub, you can track the results of all your scans in the Spotter app. The app provides an intuitive dashboard where you can keep up with your scan history, the frequency of failed playbook executions, and your progress over time.
The Spotter app also allows you to collaborate with your team by inviting users to become part of your organization, creating a shared workspace so you can all track progress on shared projects and work together across projects. And vice versa, others can invite you to become part of their organization, so you can be part of as many organizations as your heart desires. Don’t worry, we also offer the ability to decline invitations if things get out of hand 😉
Are you asking yourself, “Ok, but can this tool really help me write better playbooks?”. We know it sounds too good to be true, but yes, Spotter really does help improve the quality of your playbooks. You’ll find that you spend less time digging through documentation and guessing how to solve your specific problems, and you’ll notice that you need to run Ansible much less often, minimizing the number of failed attempts.
Still not convinced? Go ahead, try it out!