Structuring Ansible Projects
Guide to starting and organizing Ansible projects, from basic inventory setups to advanced collections and execution environments.
Guide to starting and organizing Ansible projects, from basic inventory setups to advanced collections and execution environments.
Guideline for securely accessing Ansible Vault during development without storing passwords in plain files, using GNOME Keyring or environment variables.
Docker-in-Docker (DinD) is a common technique used in GitLab CI/CD pipelines on Kubernetes to run Docker commands within Docker containers.
Ansible engineering and operations should be treated as distinct disciplines to promote high-quality, maintainable automation. This separation ensures that engineering focuses on building scalable, reusable code, while operations handles deployment, monitoring, and day-to-day execution.
Prefix public role variables with the role name, internal role variables with __role_name_, inventory-only variables with a project prefix, and separate words with underscores in Ansible variable names.
Guideline for using an inventory plugin in Ansible development environments as a concrete example to illustrate future full automation for organizations new to Ansible.
Use a group-based approach to organize your Ansible inventory and variables for different environments.
Use item as the default loop variable. Reserve loop_control.loop_var for cases where item would collide across loop boundaries, such as nested loops and include_tasks.
In Scrum-based Ansible projects, story points and velocity should be estimated and measured accurately, with a strong emphasis on the business value derived from automation content. Story points aren’t about time but about relative effort, complexity, and risk.
Guidance on managing secrets using Ansible Vault in Ansible projects, with a focus on Ansible Automation Platform (AAP) and AWX.
Prefer dot notation for fixed keys. Use bracket notation only when dot notation cannot express the access safely or correctly.
Automate Red Hat Enterprise Linux (RHEL) registration and subscription in C2 Platform development environments using Vagrant for seamless access to Red Hat resources.
Adopt consistent and meaningful naming for sprints, inspired by Semantic Versioning (SemVer) principles. This “SemSprint” approach makes sprint names descriptive, improving communication and traceability.
Guidelines for creating Ansible service accounts with a phased permissions strategy, leveraging IaC and GitOps for risk mitigation, and applying logical analysis for PoLP in automation environments.
Define download URLs and paths in variables instead of hardcoding them in tasks.
Establish effective Definition of Done (DoD) criteria specifically for Ansible projects to ensure that deliverables are complete, tested, and ready for production. DoD acts as a checklist to prevent “done” from meaning “mostly done.”
Use loop_control.label to keep Ansible loop output short and readable when a loop iterates over dictionaries or other large values.
Learn how to effortlessly synchronize a folder from your host machine to the guest machine.
Ansible configuration that should be local and ignored by Git.
When targeting MS Windows hosts, use slashes for all paths. Convert to backslashes only if necessary.
Use a consistent tagging structure in Ansible roles to make playbook runs more targeted and maintainable.
Use dictionary merging deliberately and predictably in Ansible inventories to keep overrides maintainable.
Prefer short, consistent names that reduce noise without making variables or identifiers unclear.
Prefer import_tasks, import_role, or the play-level roles section for reusable Ansible content. Use include_tasks or include_role only when you need dynamic runtime behavior.
Guidelines for implementing branching and merging policies in GitOps pipelines for Ansible inventory projects to promote changes across environments.
Automate setup of the development environment with multiple Git repositories.
Guideline for using GitLab Runner as an Ansible control node when Ansible Automation Platform (AAP) is unavailable.
This guideline is tailored for teams that are relatively new to Ansible and wish to gain experience by using internal roles.
Guidelines for resolving the PIP “externally-managed-environment” error on Ubuntu 24.04 when installing Python packages for Ansible automation.