Ansible Ansible: K.I.S.S. Optimization It's fascinating, but our automation code is mature enough to have compatibility issues during the operating system upgrade. Let's see how violating the "Keep it simple stupid (K.I.S.S.)" principle leads you to trouble.
Ansible Ansible: Log Visibility Control Ansible, originally developed as a state management tool, relies on logs to track play progress and target states due to its distributed execution. Let's discuss a few methods for controlling log content and visibility.
Ansible Ansible: Ad-Hoc Shell Module I shared a tip on handling missing files in an Ansible playbook some time ago. I have now tried to do the same with ad hoc command execution. Here is how you can use extra module arguments.
Ansible Ansible: A Shell Execution Shortcut Here is a small trick that could make your playbooks, if not more readable, at least shorter. The trick is useful if you use Shell to execute multiple commands on targets.
Ansible AAP: Code Compatibility Our good old Red Hat Ansible Tower was recently upgraded to the Ansible Automation Platform. Although the AAP adoption was fast, Ansible compatibility tack derailed half an O&M templates in our organization. The error message says, "Invalid data passed to 'loop', it requires a list,
Ansible Ansible: Date and Time Anyone who works with Ansible knows how to access the current date and time. But have you ever dealt with something a bit more advanced? There are a few tips you may find helpful.
Ansible Ansible: Dynamic Inventory I know that Ansible could use as inventory virtually anything, including scripts. However, all inventories on my day job are static, and we keep them in a source repository, and until now, I haven't had a chance to create or use one.
Ansible Ansible: Markdown Reports The previous post [https://chronicler.tech/ansible-simple-reports] promised a simple reporting solution and two potential possibilities. Now it's time to go through the solution that would help you with report publications. The diagram from the previous post depicts information flow between components. Ansible Markdown Reports on Git/GitLab
Ansible Ansible: Format e-mail body. The whole automation idea is to minimize or exclude humans from the process. However, you need to notify users and sometimes you should do it in style.
Ansible Ansible: Simple Reports Any IT system, bigger than a chihuahua, ought to produce reports. It does not matter how they look, but it should generate and share information that humans can read.
Ansible Ansible, YAML, and JSON Ansible is very flexible with data types, and easily transforms primitives and even JSON strings, but from time to time you need to process and transform something a bit more complex than String to Boolean conversions.
Ansible Ansible: Iterations Iterations in Ansible are not first-class citizens. The language allows you a single task loop with one nested iteration. Anything more sophisticated than that should be implemented as a separate module. Again, the include_tasks command gives us a helping hand.
Ansible Ansible: Selections Let's discuss selections in Ansible: if-then-else and case/switch operators. Ansible offers conditional execution for single tasks, blocks, and task imports. In addition, it allows effectively simulate if-then selection.
Ansible Ansible: Subroutines The second post in the Ansible: Control Structures [https://chronicler.tech/ansible-control-structures/] series describes using Ansible core components to emulate subroutines - procedures and "packages." The whole paradigm of Ansible is the opposite of some core programming languages principles - encapsulation and isolation. Any task on the same
Ansible Ansible: Control Structures Red Hat Ansible is a powerful and easy-to-learn automation product. Simplicity is one of the basic principles of the language. Yet, any task a titbit more complex than installing and starting an HTTPD server requires good old procedural control flows.
Ansible Ansible Variables: a Rookie Mistake The mistake I made could be excused for Java Developer, but not for a guy who spends days with Ansible. The root cause is the different variable visibility model. Red Hat Ansible does not appreciate role or play boundaries and dynamically evaluates a variable value for each impacted host.
Git Automate Housekeeping For one who does automation for living, it's okay to be a bit lazy. So let's talk about how I keep my local git repositories in order with minimal effort.
Ansible Ansible and Git Submodules Let's discuss a problem I faced, moving from Ansible to the Ansible Tower. The problem is how to maintain multiple inventories scattered all over new projects effectively.
Ansible Ansible: Conditional Playbooks I have praised Ansible tags all about the previous post. Unfortunately, tags don't go along with Ansible Tower's complex workflows. Let me guide you through the playbook transformation we've done. The answer to this challenge is extra variables.
Ansible Ansible: the Power of Tags Let's talk about why you should use tags in your Ansible playbooks. For starters, I'll lecture you a bit about tags in the Ansible language, and then show you how we use them in a real-life scenario.
Ansible Ansible Tower: Dynamic Usernames The slow drift toward the Red Hat Ansible Tower uncovers more and more compatibility issues, so I have to go back and revisit some decisions and make sure that the same code would fit both worlds.
Ansible Ansible: Consume SQL*Plus Output A simple way to consume Oracle Database data in Ansible playbooks without extensive Python or PL/SQL coding or 3rd party modules.
Ansible Automating Oracle Forms environment files configuration Automating everything many times comes to a halt once you discover that specific applications or platforms do not support changes to be done using a command-line interface. One such application is Oracle Forms, even if you run the latest and greatest version of it. This post is not to prove
Ansible Ansible: dynamic usernames Ansible uses OS username to authenticate against targets. When you need to run commands as a different user, you have multiple options: privilege escalation, set a remote username, and dynamic definition in inventory.
Git What I ignore in Ansible projects Keep your repository neat and clean is a mandatory repository requirement, same as readable documentation and a good code, preferably useful. So, one of the first things I do in a new project is a .gitignore file.