{"id":14984425,"url":"https://github.com/eon01/ansiblecheatsheet","last_synced_at":"2026-02-18T12:33:32.507Z","repository":{"id":235237629,"uuid":"790346030","full_name":"eon01/AnsibleCheatSheet","owner":"eon01","description":"A cheat sheet for Ansible, the automation tool.","archived":false,"fork":false,"pushed_at":"2024-04-22T18:20:13.000Z","size":11,"stargazers_count":30,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-15T23:41:38.577Z","etag":null,"topics":["ansible","ansible-collection","ansible-galaxy","ansible-modules","ansible-playbook","ansible-playbooks","ansible-project","ansible-role","ansible-roles","automation"],"latest_commit_sha":null,"homepage":"https://eon01.github.io/AnsibleCheatSheet/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eon01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-22T17:59:18.000Z","updated_at":"2025-04-25T15:15:33.000Z","dependencies_parsed_at":"2024-04-22T19:38:11.674Z","dependency_job_id":"654749b4-7838-4c16-a6a3-e58c563074be","html_url":"https://github.com/eon01/AnsibleCheatSheet","commit_stats":null,"previous_names":["eon01/ansiblecheatsheet"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eon01/AnsibleCheatSheet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2FAnsibleCheatSheet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2FAnsibleCheatSheet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2FAnsibleCheatSheet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2FAnsibleCheatSheet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eon01","download_url":"https://codeload.github.com/eon01/AnsibleCheatSheet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eon01%2FAnsibleCheatSheet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021005,"owners_count":26086946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ansible-collection","ansible-galaxy","ansible-modules","ansible-playbook","ansible-playbooks","ansible-project","ansible-role","ansible-roles","automation"],"created_at":"2024-09-24T14:09:01.355Z","updated_at":"2025-10-14T20:14:03.118Z","avatar_url":"https://github.com/eon01.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eThe Ansible Cheat Sheet\u003c/h1\u003e\n    \u003cp\u003eA cheat sheet for Ansible, the automation tool.\u003c/p\u003e\n    \u003cp\u003eLet's create the largest and most comprehensive cheat sheet for Ansible. If you have a tip or trick that you think should be included, please contribute.\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/eon01/AnsibleCheatSheet?style=social\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/eon01/AnsibleCheatSheet?style=social\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/watchers/eon01/AnsibleCheatSheet?style=social\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/eon01/AnsibleCheatSheet?style=social\"/\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/eon01/AnsibleCheatSheet?style=social\"/\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![X (formerly Twitter) URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Fgithub.com%2Feon01%2FAnsibleCheatSheet)\n![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/%40joinFAUN)\n\n\u003c/div\u003e\n\n# Sponsors\n\n## ❤️ The ansible Workshop: Hands-On Learning For Rapid Mastery\n\nIn \"The Ansible Workshop,\" you will deep dive into the world of Ansible, the amazing automation tool that converts complex IT tasks into a set of easy, simple-to-repeat steps. This guide is your roadmap to mastering Ansible, whether you are a novice just starting to use Ansible or an intermediate user who has already used Ansible and is looking for additional information and tricks to enhance your skills.\n\nYou can get it on [Amazon](https://amzn.to/3watGU8)\n\n## 📩 DevOpsLinks: The Ultimate DevOps Newsletter\n\n[DevOpsLinks](https://faun.dev/newsletter/devopslinks) - The Ultimate DevOps Newsletter. Curated DevOps news, tutorials, tools, jobs, podcasts, and more. Delivered to your inbox every week.\n\n## 🛍️ ByteVibe: Show off your love for all things TECH\n\nIf you're seeking a cozy sweatshirt to wear during your extended coding sessions or a mug to exhibit your passion for programming, [you can find it all here](https://bytevibe.co/)\n\n## 💌 Sponsorship\n\nIf you would like to sponsor this project, please contact me at aymen at faun dot dev.\n\n# Call for Contributions\n\nLet's create the largest and most comprehensive list of Ansible tools and resources. If you have a tool or resource that you think should be included, please contribute.\n\n# Table of Contents\n\n- [Sponsors](#sponsors)\n  - [❤️ The ansible Workshop: Hands-On Learning For Rapid Mastery](#️-the-ansible-workshop-hands-on-learning-for-rapid-mastery)\n  - [📩 DevOpsLinks: The Ultimate DevOps Newsletter](#-devopslinks-the-ultimate-devops-newsletter)\n  - [🛍️ ByteVibe: Show off your love for all things TECH](#️-bytevibe-show-off-your-love-for-all-things-tech)\n  - [💌 Sponsorship](#-sponsorship)\n- [Call for Contributions](#call-for-contributions)\n- [Table of Contents](#table-of-contents)\n- [The Ansible Cheat Sheet](#the-ansible-cheat-sheet)\n  - [Installing Ansible](#installing-ansible)\n    - [On Linux](#on-linux)\n    - [On macOS](#on-macos)\n    - [On Windows](#on-windows)\n  - [Configuring Ansible](#configuring-ansible)\n  - [Inventory](#inventory)\n    - [Setting Up the Inventory File (INI)](#setting-up-the-inventory-file-ini)\n    - [Setting Up the Inventory File (YAML)](#setting-up-the-inventory-file-yaml)\n  - [Ansible Host Variables](#ansible-host-variables)\n  - [Testing Your Setup](#testing-your-setup)\n  - [Playbook Structure](#playbook-structure)\n  - [Playbook Keywords](#playbook-keywords)\n  - [Common Modules](#common-modules)\n    - [Running a Command](#running-a-command)\n    - [Running a Shell Command](#running-a-shell-command)\n    - [Running a Raw Command](#running-a-raw-command)\n    - [Copying a File](#copying-a-file)\n    - [Installing a Package](#installing-a-package)\n    - [Restarting a Service](#restarting-a-service)\n    - [Copying a File with Permissions](#copying-a-file-with-permissions)\n    - [Copying a File with Permissions and Context](#copying-a-file-with-permissions-and-context)\n  - [Playbooks](#playbooks)\n    - [Running a Playbook](#running-a-playbook)\n    - [Running a Playbook with Inventory](#running-a-playbook-with-inventory)\n    - [Running a Playbook with Inventory and Limit](#running-a-playbook-with-inventory-and-limit)\n    - [Running a Playbook with Limit](#running-a-playbook-with-limit)\n    - [Running a Playbook with Tags](#running-a-playbook-with-tags)\n    - [Running a Playbook with Skip Tags](#running-a-playbook-with-skip-tags)\n    - [Running a Playbook with Extra Variables](#running-a-playbook-with-extra-variables)\n    - [Running a Playbook with a Vault Password File](#running-a-playbook-with-a-vault-password-file)\n    - [Running a Playbook with Ask Vault Password](#running-a-playbook-with-ask-vault-password)\n    - [Running a Playbook with Ask Sudo Password](#running-a-playbook-with-ask-sudo-password)\n    - [Running a Playbook with Ask Pass](#running-a-playbook-with-ask-pass)\n    - [Running a Playbook in Check Mode](#running-a-playbook-in-check-mode)\n    - [Running a Playbook in Diff Mode](#running-a-playbook-in-diff-mode)\n    - [Running a Playbook in Verbose Mode](#running-a-playbook-in-verbose-mode)\n    - [Running a Playbook in Extra Verbose Mode](#running-a-playbook-in-extra-verbose-mode)\n    - [Running a Playbook in Extra Extra Verbose Mode](#running-a-playbook-in-extra-extra-verbose-mode)\n    - [Running a Playbook in Extra Extra Extra Verbose Mode](#running-a-playbook-in-extra-extra-extra-verbose-mode)\n    - [Running a Playbook in Extra Extra Extra Extra Verbose Mode](#running-a-playbook-in-extra-extra-extra-extra-verbose-mode)\n    - [Running a Playbook with Forks](#running-a-playbook-with-forks)\n    - [Running a Playbook with Timeout](#running-a-playbook-with-timeout)\n  - [Jinja2](#jinja2)\n    - [Using Jinja2](#using-jinja2)\n    - [Using Jinja2 with Filters](#using-jinja2-with-filters)\n    - [Jinja2 Template](#jinja2-template)\n    - [Jinja2 Template with Variables](#jinja2-template-with-variables)\n    - [Templates with Loops](#templates-with-loops)\n    - [Templates with Conditionals](#templates-with-conditionals)\n    - [Templates with Filters](#templates-with-filters)\n  - [Host Patterns](#host-patterns)\n  - [Debugging](#debugging)\n    - [Syntax Check a Playbook](#syntax-check-a-playbook)\n    - [Check if Hosts Are Reachable](#check-if-hosts-are-reachable)\n    - [Check if Hosts Are Reachable with SSH](#check-if-hosts-are-reachable-with-ssh)\n    - [Check if Hosts Are Reachable with WinRM](#check-if-hosts-are-reachable-with-winrm)\n    - [Check if Hosts Are Reachable Locally](#check-if-hosts-are-reachable-locally)\n    - [Verbose Mode](#verbose-mode)\n    - [Debug Mode](#debug-mode)\n    - [Capture Output](#capture-output)\n    - [Capture Output and Show Only Specific Fields](#capture-output-and-show-only-specific-fields)\n    - [Capture Output and Show Only Specific Fields with Jinja2](#capture-output-and-show-only-specific-fields-with-jinja2)\n  - [Gathering Facts](#gathering-facts)\n    - [Gathering Facts for All Hosts](#gathering-facts-for-all-hosts)\n    - [Gathering Facts for a Specific Host](#gathering-facts-for-a-specific-host)\n    - [Gathering Facts for a Specific Host and Saving to a File](#gathering-facts-for-a-specific-host-and-saving-to-a-file)\n  - [Variables](#variables)\n    - [Setting a Variable](#setting-a-variable)\n    - [Setting a Variable with Multiple Lines](#setting-a-variable-with-multiple-lines)\n    - [Setting a Variable with Multiple Lines and Indentation](#setting-a-variable-with-multiple-lines-and-indentation)\n  - [Conditionals](#conditionals)\n    - [When](#when)\n    - [When with Multiple Conditions](#when-with-multiple-conditions)\n  - [Loops](#loops)\n    - [Looping Over a List](#looping-over-a-list)\n    - [Looping Over a Dictionary](#looping-over-a-dictionary)\n    - [Looping Over a Dictionary Using \"with\\_dict\"](#looping-over-a-dictionary-using-with_dict)\n    - [Looping Over a List with \"with\\_items\"](#looping-over-a-list-with-with_items)\n  - [Handlers](#handlers)\n    - [Using Handlers](#using-handlers)\n    - [Using Handlers with Multiple Tasks](#using-handlers-with-multiple-tasks)\n    - [Using Handlers with Multiple Tasks and Different Handlers](#using-handlers-with-multiple-tasks-and-different-handlers)\n  - [Conditional Execution](#conditional-execution)\n    - [Using \"ignore\\_errors\" to Continue Execution Even After Failures](#using-ignore_errors-to-continue-execution-even-after-failures)\n    - [Using \"changed\\_when\" to Control When a Task Is Considered Changed](#using-changed_when-to-control-when-a-task-is-considered-changed)\n    - [Using \"failed\\_when\" to Control When a Task Is Considered Failed](#using-failed_when-to-control-when-a-task-is-considered-failed)\n    - [Failing a Playbook with \"fail\"](#failing-a-playbook-with-fail)\n  - [Vault](#vault)\n    - [Editing an Encrypted File](#editing-an-encrypted-file)\n    - [Updating Encryption Password](#updating-encryption-password)\n    - [Viewing an Encrypted File](#viewing-an-encrypted-file)\n    - [Encrypting a File](#encrypting-a-file)\n    - [Encrypting a File with a Password File](#encrypting-a-file-with-a-password-file)\n    - [Decrypting a File](#decrypting-a-file)\n    - [Encrypting a String](#encrypting-a-string)\n    - [Encrypting a String with a Password File](#encrypting-a-string-with-a-password-file)\n  - [Asynchronous Tasks](#asynchronous-tasks)\n    - [Running a Task Asynchronously](#running-a-task-asynchronously)\n    - [Checking the Status of Asynchronous Tasks](#checking-the-status-of-asynchronous-tasks)\n  - [Roles](#roles)\n    - [Creating a Role](#creating-a-role)\n    - [Using a Role](#using-a-role)\n    - [Using a Role with Variables](#using-a-role-with-variables)\n    - [Using a Role with Multiple Variables](#using-a-role-with-multiple-variables)\n    - [Using a Role with Tags](#using-a-role-with-tags)\n  - [Ansible Galaxy](#ansible-galaxy)\n    - [Searching for Roles](#searching-for-roles)\n    - [Installing a Role](#installing-a-role)\n    - [Installing a Role with a Specific Version](#installing-a-role-with-a-specific-version)\n  - [Ansible Collections](#ansible-collections)\n    - [Installing a Collection](#installing-a-collection)\n    - [Installing a Collection with a Specific Version](#installing-a-collection-with-a-specific-version)\n    - [Installing a Collection from a File](#installing-a-collection-from-a-file)\n    - [Installing a Collection from a Directory](#installing-a-collection-from-a-directory)\n  - [Resources About Ansible](#resources-about-ansible)\n    - [Official Ansible Documentation](#official-ansible-documentation)\n    - [Ansible Blogs and Articles](#ansible-blogs-and-articles)\n    - [Ansible Community and Forums](#ansible-community-and-forums)\n    - [Ansible GitHub Repository](#ansible-github-repository)\n    - [Ansible Videos](#ansible-videos)\n    - [Ansible Tools](#ansible-tools)\n    - [IDE Extensions](#ide-extensions)\n      - [VSCode](#vscode)\n      - [PyCharm](#pycharm)\n      - [Sublime](#sublime)\n      - [Vim](#vim)\n    - [Newsletters](#newsletters)\n\n# The Ansible Cheat Sheet\n\n## Installing Ansible\n\n### On Linux\n\n```bash\n# Ubuntu/Debian\nsudo apt update\nsudo apt install ansible\n# On Red Hat-based systems (Fedora, CentOS)\nsudo yum install ansible\n```\n\nOr use pip:\n\n```bash\npip install ansible\n```\n\nOr use pipx:\n\n```bash\npipx install ansible\n```\n\n### On macOS\n\nUse Homebrew:\n\n```bash\nbrew install ansible\n```\n\n### On Windows\n\nAnsible can be run from inside a Windows Subsystem for Linux (WSL) instance. First, ensure that WSL is installed, then install Ansible in the Linux distribution of your choice, following the Linux installation steps.\n\n## Configuring Ansible\n\nDefault Ansible configuration settings can be overridden using environment variables. The same variables can be used to override settings in the `ansible.cfg` file in ini format. Typically, environment variables are in capital letters, while the corresponding configuration settings are in lowercase.\n\n| Environment Variable | ansible.cfg Variable | ansible.cfg Section | Description |\n|----------------------|----------------------|---------------------|-------------|\n| `ANSIBLE_CONFIG` | N/A | N/A | Specifies the path to the Ansible configuration file. |\n| `ANSIBLE_DEBUG` | `debug` | `[defaults]` | Enables or disables debug output. Set to `True` for verbose debug information. |\n| `ANSIBLE_INVENTORY` | `inventory` | `[defaults]` | Path to the inventory file or script. |\n| `ANSIBLE_NOCOLOR` | `nocolor` | `[defaults]` | Disables colored output in Ansible. |\n| `ANSIBLE_FORCE_COLOR` | `force_color` | `[defaults]` | Forces colored output even when not in a TTY. |\n| `ANSIBLE_HOST_KEY_CHECKING` | `host_key_checking` | `[defaults]` | Enables or disables SSH host key checking. |\n| `ANSIBLE_REMOTE_USER` | `remote_user` | `[defaults]` | Default remote user for SSH connections. |\n| `ANSIBLE_PRIVATE_KEY_FILE` | `private_key_file` | `[defaults]` | Specifies the private key file for SSH. |\n| `ANSIBLE_TIMEOUT` | `timeout` | `[defaults]` | Connection timeout duration in seconds. |\n| `ANSIBLE_ROLES_PATH` | `roles_path` | `[defaults]` | Specifies the path to Ansible roles. |\n| `ANSIBLE_LIBRARY` | `library` | `[defaults]` | Path to custom module directories. |\n| `ANSIBLE_RETRY_FILES_ENABLED` | `retry_files_enabled` | `[defaults]` | Enables or disables the creation of retry files. |\n| `ANSIBLE_VAULT_PASSWORD_FILE` | `vault_password_file` | `[defaults]` | Path to the Ansible vault password file. |\n| `ANSIBLE_VAULT_IDENTITY_LIST` | `vault_identity_list` | `[defaults]` | List of vault identities for decryption. |\n| `ANSIBLE_STDOUT_CALLBACK` | `stdout_callback` | `[defaults]` | Sets the default callback plugin for output formatting. |\n| `ANSIBLE_CALLBACK_WHITELIST` | `callback_whitelist` | `[defaults]` | List of callback plugins allowed to execute. |\n| `ANSIBLE_FORKS` | `forks` | `[defaults]` | Number of parallel processes to use. |\n| `ANSIBLE_ASK_VAULT_PASS` | `ask_vault_pass` | `[defaults]` | Determines whether Ansible prompts for the vault password by default. |\n| `ANSIBLE_TRANSPORT` | `transport` | `[defaults]` | Specifies the connection type (e.g., SSH, WinRM). |\n| `ANSIBLE_GATHERING` | `gathering` | `[defaults]` | Configures the default fact gathering behavior. |\n| `ANSIBLE_GATHER_SUBSET` | `gather_subset` | `[defaults]` | Specifies a subset of facts to gather. |\n| `ANSIBLE_SSH_ARGS` | `ssh_args` | `[ssh_connection]` | Extra arguments to pass to the SSH command. |\n| `ANSIBLE_SSH_RETRIES` | `retries` | `[ssh_connection]` | Specifies the number of attempts Ansible will make to connect via SSH before giving up. |\n| `ANSIBLE_BECOME` | `become` | `[privilege_escalation]` | Enables or disables privilege escalation. The default is `False`. |\n| `ANSIBLE_BECOME_METHOD` | `become_method` | `[privilege_escalation]` | The method used for privilege escalation, the default is `sudo`. |\n| `ANSIBLE_BECOME_USER` | `become_user` | `[privilege_escalation]` | The user to become on privilege escalation, the default is `root`. |\n| `ANSIBLE_BECOME_ASK_PASS` | `become_ask_pass` | `[privilege_escalation]` | Prompts for a password for privilege escalation, the default is `False`. |\n| `ANSIBLE_GALAXY_SERVER` | `server` | `[galaxy]` | Specifies the default Galaxy server from which roles are installed. |\n| `ANSIBLE_INVENTORY_ENABLED` | `inventory_enabled` | `[inventory]` | Specifies the enabled inventory plugins. The default is `[‘host_list’, ‘script’, ‘auto’, ‘yaml’, ‘ini’, ‘toml’]`. |\n\nFor more detailed information on these configurations, consult the [official Ansible documentation](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-configuration-settings).\n\n## Inventory\n\n### Setting Up the Inventory File (INI)\n\n```ini\n[web]\n192.168.1.2 ansible_ssh_user=ubuntu\n\n[db]\n192.168.1.3 ansible_ssh_user=root\n```\n\n### Setting Up the Inventory File (YAML)\n\n```yaml\nall:\n  hosts:\n    192.168.1.2:\n      ansible_ssh_user: ubuntu\n    192.168.1.3:\n      ansible_ssh_user: root\n```\n\nReplace the IP addresses and `ansible_ssh_user` with your server details.\n\n## Ansible Host Variables\n\n| Variable | Description |\n|----------|-------------|\n| `ansible_connection` | The type of connection to the host. The default is 'smart'. It supports SSH (`smart`, `ssh`, `paramiko`) and other types. |\n| `ansible_host` | The hostname or IP to connect to, if different from the alias. |\n| `ansible_port` | The connection port number. The default is 22 for SSH. |\n| `ansible_user` | The username for connecting to the host. |\n| `ansible_password` | The password for authentication (use vault for security). |\n| `ansible_ssh_private_key_file` | The private key file for SSH, useful for multiple keys. |\n| `ansible_ssh_common_args` | The common arguments appended to sftp, scp, ssh commands. |\n| `ansible_sftp_extra_args` | The extra arguments for the sftp command line. |\n| `ansible_scp_extra_args` | The extra arguments for the scp command line. |\n| `ansible_ssh_extra_args` | The extra arguments for the ssh command line. |\n| `ansible_ssh_pipelining` | Whether to use SSH pipelining, overrides ansible.cfg setting. |\n| `ansible_ssh_executable` | Overrides the default system ssh, added in version 2.2. |\n| `ansible_become` | Forces privilege escalation, equivalent to `ansible_sudo` or `ansible_su`. |\n| `ansible_become_method` | Sets the privilege escalation method. |\n| `ansible_become_user` | Sets the user for privilege escalation. |\n| `ansible_become_password` | Sets the privilege escalation password (use vault for security). |\n| `ansible_become_exe` | Sets the executable for the escalation method. |\n| `ansible_become_flags` | Flags for the selected escalation method, can be set in ansible.cfg. |\n| `ansible_shell_type` | The shell type of the target system. The default is Bourne (sh) compatible. |\n| `ansible_python_interpreter` | The Python interpreter path on the target host. |\n| `ansible_*_interpreter` | The generic interpreter setting, works like `ansible_python_interpreter`. New in version 2.1. |\n| `ansible_shell_executable` | The shell executable Ansible uses on the target, overrides ansible.cfg. |\n\nThis table provides a summary of the host-specific variables in Ansible. For detailed information and examples, refer to the [official Ansible documentation](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#host-variables).\n\n## Testing Your Setup\n\nTo ensure that Ansible can communicate with your managed nodes, use the `ping` module:\n\n```bash\nansible all -m ping -i inventory\n```\n\n## Playbook Structure\n\n```yaml\n---\n- name: Playbook Name\n  hosts: all\n  become: yes\n  become_user: root\n  become_method: sudo\n  vars:\n    my_var: 123\n  vars_files:\n    - vars.yml\n  tasks:\n    - name: Task Name\n      command: echo \"Hello World!\"\n```\n\n## Playbook Keywords\n\n| Keyword | Description |\n|---------|-------------|\n| `name` | The name of the playbook or task. |\n| `hosts` | The hosts or host groups to run the playbook on. |\n| `become` | Whether to run tasks with privilege escalation. |\n| `become_user` | The user to become when using privilege escalation. |\n| `become_method` | The method to use for privilege escalation (e.g., sudo). |\n| `remote_user` | The user to connect as on the remote host. |\n| `vars` | The variables to be used in the playbook. |\n| `vars_files` | The files containing variables to be used in the playbook. |\n| `tasks` | The list of tasks to be executed. |\n| `handlers` | The list of handlers to be executed upon notification. |\n| `pre_tasks` | The list of tasks to be executed before roles. |\n| `post_tasks` | The list of tasks to be executed after the main tasks. |\n| `roles` | The list of roles to be included and executed. |\n| `serial` | The number of hosts to process in each playbook run. |\n| `max_fail_percentage` | The maximum failure percentage allowed to continue the playbook. |\n| `any_errors_fatal` | Whether any error is enough to stop the playbook. |\n| `ignore_errors` | Whether to ignore errors on a task. |\n| `gather_facts` | Whether to gather facts at the beginning of the playbook. |\n| `no_log` | Whether to disable logging for a task. |\n| `force_handlers` | Whether to run handlers even if a task fails. |\n| `tags` | The tags associated with tasks or roles for selective running. |\n| `check_mode` | Whether to run the playbook in check mode (dry run). |\n| `diff` | Whether to show differences in tasks where supported. |\n| `connection` | The connection type to use (e.g., `ssh`, `local`, `winrm`). |\n| `timeout` | The connection timeout duration in seconds. |\n| `gather_subset` | The subset of facts to gather (Possible values: `all`, `min`, `hardware`, `network`, `virtual`, `ohai`, and `facter`). |\n\nFor detailed information and examples, refer to the [official Ansible documentation](https://docs.ansible.com/ansible/latest/user_guide/playbooks_keywords.html).\n\n## Common Modules\n\n### Running a Command\n\n**Ad-hoc**:\n\n```bash\nansible all -m command -a \"uptime\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Run a Command\n  hosts: all\n  tasks:\n    - name: Run a Command\n      command: uptime\n```\n\n### Running a Shell Command\n\n**Ad-hoc**:\n\n```bash\nansible all -m shell -a \"echo $TERM\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Run a Shell Command\n  hosts: all\n  tasks:\n    - name: Run a Shell Command\n      shell: echo $TERM\n```\n\n### Running a Raw Command\n\n**Ad-hoc**:\n\n```bash\nansible all -m raw -a \"echo $TERM\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Run a Raw Command\n  hosts: all\n  tasks:\n    - name: Run a Raw Command\n      raw: echo $TERM\n```\n\n### Copying a File\n\n**Ad-hoc**:\n\n```bash\nansible all -m copy -a \"src=/etc/hosts dest=/tmp/hosts\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Copy a File\n  hosts: all\n  tasks:\n    - name: Copy a File\n      copy:\n        src: /etc/hosts\n        dest: /tmp/hosts\n```\n\n### Installing a Package\n\n**Ad-hoc**:\n\n```bash\nansible all -m apt -a \"name=nginx state=present\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Install a Package\n  hosts: all\n  tasks:\n    - name: Install a Package\n      apt:\n        name: nginx\n        state: present\n```\n\n### Restarting a Service\n\n**Ad-hoc**:\n\n```bash\nansible all -m service -a \"name=nginx state=restarted\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Restart a Service\n  hosts: all\n  tasks:\n    - name: Restart a Service\n      service:\n        name: nginx\n        state: restarted\n```\n\n### Copying a File with Permissions\n\n**Ad-hoc**:\n\n```bash\nansible all -m copy -a \"src=/etc/hosts dest=/tmp/hosts owner=root group=root mode=0644\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Copy a File with Permissions\n  hosts: all\n  tasks:\n    - name: Copy a File with Permissions\n      copy:\n        src: /etc/hosts\n        dest: /tmp/hosts\n        owner: root\n        group: root\n        mode: 0644\n```\n\n### Copying a File with Permissions and Context\n\n**Ad-hoc**:\n\n```bash\nansible all -m copy -a \"src=/etc/hosts dest=/tmp/hosts owner=root group=root mode=0644 seuser=system_u serole=object_r\"\n```\n\n**Playbook**:\n\n```yaml\n---\n- name: Copy a File with Permissions and Context\n  hosts: all\n  tasks:\n    - name: Copy a File with Permissions and Context\n      copy:\n        src: /etc/hosts\n        dest: /tmp/hosts\n        owner: root\n        group: root\n        mode: 0644\n        seuser: system_u\n        serole: object_r\n```\n\n## Playbooks\n\n### Running a Playbook\n\n```bash\nansible-playbook playbook.yml\n```\n\n### Running a Playbook with Inventory\n\n```bash\nansible-playbook playbook.yml -i inventory\n```\n\n### Running a Playbook with Inventory and Limit\n\n```bash\nansible-playbook playbook.yml -i inventory --limit \"web\"\n```\n\n### Running a Playbook with Limit\n\n```bash\nansible-playbook playbook.yml --limit \"web\"\n```\n\n### Running a Playbook with Tags\n\n```bash\nansible-playbook playbook.yml --tags \"install,configure\"\n```\n\n### Running a Playbook with Skip Tags\n\n```bash\nansible-playbook playbook.yml --skip-tags \"configure\"\n```\n\n### Running a Playbook with Extra Variables\n\n```bash\nansible-playbook playbook.yml --extra-vars \"my_var=123\"\n```\n\n### Running a Playbook with a Vault Password File\n\n```bash\nansible-playbook playbook.yml --vault-password-file ~/.vault_pass.txt\n```\n\n### Running a Playbook with Ask Vault Password\n\n```bash\nansible-playbook playbook.yml --ask-vault-pass\n```\n\n### Running a Playbook with Ask Sudo Password\n\n```bash\nansible-playbook playbook.yml --ask-become-pass\n```\n\n### Running a Playbook with Ask Pass\n\n```bash\nansible-playbook playbook.yml --ask-pass\n```\n\n### Running a Playbook in Check Mode\n\n```bash\nansible-playbook playbook.yml --check\n```\n\n### Running a Playbook in Diff Mode\n\n```bash\nansible-playbook playbook.yml --diff\n```\n\n### Running a Playbook in Verbose Mode\n\n```bash\nansible-playbook playbook.yml -v\n```\n\n### Running a Playbook in Extra Verbose Mode\n\n```bash\nansible-playbook playbook.yml -vv\n```\n\n### Running a Playbook in Extra Extra Verbose Mode\n\n```bash\nansible-playbook playbook.yml -vvv\n```\n\n### Running a Playbook in Extra Extra Extra Verbose Mode\n\n```bash\nansible-playbook playbook.yml -vvvv\n```\n\n### Running a Playbook in Extra Extra Extra Extra Verbose Mode\n\n```bash\nansible-playbook playbook.yml -vvvvv\n```\n\n### Running a Playbook with Forks\n\n```bash\nansible-playbook playbook.yml --forks 50\n```\n\n### Running a Playbook with Timeout\n\n```bash\nansible-playbook playbook.yml --timeout 30\n```\n\n## Jinja2\n\n### Using Jinja2\n\n```yaml\n---\n- name: Using Jinja2\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Using Jinja2\n      debug:\n        msg: \"{{ my_var }}\"\n```\n\n### Using Jinja2 with Filters\n\n```yaml\n---\n- name: Using Jinja2 with Filters\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Using Jinja2 with Filters\n      debug:\n        msg: \"{{ my_var | string }}\"\n```\n\n### Jinja2 Template\n\n```yaml\n---\n- name: Jinja2 Template\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Jinja2 Template\n      template:\n        src: template.j2\n        dest: /tmp/template.txt\n```\n\n### Jinja2 Template with Variables\n\n```yaml\n---\n- name: Jinja2 Template with Variables\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Jinja2 Template with Variables\n      template:\n        src: template.j2\n        dest: /tmp/template.txt\n```\n\nThe \"template.j2\" file:\n\n```jinja2\nHello World! This is my_var: {{ my_var }}\n```\n\n### Templates with Loops\n\n```yaml\n---\n- name: Templates with Loops\n  hosts: localhost\n  vars:\n    my_list:\n      - 123\n      - 456\n      - 789\n  tasks:\n    - name: Templates with Loops\n      template:\n        src: template.j2\n        dest: /tmp/template.txt\n```\n\nThe \"template.j2\" file:\n\n```jinja2\n{% for item in my_list %}\n{{ item }}\n{% endfor %}\n```\n\n### Templates with Conditionals\n\n```yaml\n---\n- name: Templates with Conditionals\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Templates with Conditionals\n      template:\n        src: template.j2\n        dest: /tmp/template.txt\n```\n\nThe \"template.j2\" file:\n\n```jinja2\n{% if my_var == 123 %}\nHello World!\n{% endif %}\n```\n\n### Templates with Filters\n\n```yaml\n---\n- name: Templates with Filters\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Templates with Filters\n      template:\n        src: template.j2\n        dest: /tmp/template.txt\n```\n\nThe \"template.j2\" file:\n\n```jinja2\nHello, World! This is my_var: {{ my_var | string }}\n```\n\n## Host Patterns\n\n| Pattern | Description |\n|---------|-------------|\n| `all` | All hosts in the inventory. |\n| `*` | Same as `all`. |\n| `group1` | All hosts in the group `group1`. |\n| `group1:group2` | All hosts in the groups `group1` and `group2`. |\n| `group1:\u0026group2` | All hosts in both `group1` and `group2`. |\n| `group1:!group2` | All hosts in `group1` that are not in `group2`. |\n| `group1:\u0026group2:!group3` | All hosts in both `group1` and `group2` that are not in `group3`. |\n| `group1:group2:\u0026group3` | All hosts in both `group1` and `group2` that are also in `group3`. |\n| `group1:group2:!group3:\u0026group4` | All hosts in both `group1` and `group2` that are not in `group3` and are also in `group4`. |\n\n## Debugging\n\n### Syntax Check a Playbook\n\n```bash\nansible-playbook playbook.yml --syntax-check\n```\n\n### Check if Hosts Are Reachable\n\n```bash\nansible all -m ping\n```\n\n### Check if Hosts Are Reachable with SSH\n\n```bash\nansible all -m ping -c ssh\n```\n\n### Check if Hosts Are Reachable with WinRM\n\n```bash\nansible all -m ping -c winrm\n```\n\n### Check if Hosts Are Reachable Locally\n\n```bash\nansible all -m ping -c local\n```\n\n### Verbose Mode\n\n```bash\nansible all -m ping -v\nansible all -m ping -vv\nansible all -m ping -vvv\nansible all -m ping -vvvv\nansible all -m ping -vvvvv\n```\n\n### Debug Mode\n\n```bash\nANSIBLE_DEBUG=1 ansible all -m ping\n```\n\n### Capture Output\n\n```yaml\n---\n- name: Capture Output\n  hosts: all\n  tasks:\n    - name: Capture Output\n      command: echo \"Hello World!\"\n      register: output\n    - debug:\n        var: output\n```\n\n### Capture Output and Show Only Specific Fields\n\n```yaml\n---\n- name: Capture Output and Show Only Specific Fields\n  hosts: all\n  tasks:\n    - name: Capture Output and Show Only Specific Fields\n      command: echo \"Hello World!\"\n      register: output\n    - debug:\n        var: output.stdout\n```\n\n### Capture Output and Show Only Specific Fields with Jinja2\n\n```yaml\n---\n- name: Capture Output and Show Only Specific Fields with Jinja2\n  hosts: all\n  tasks:\n    - name: Capture Output and Show Only Specific Fields with Jinja2\n      command: echo \"Hello World!\"\n      register: output\n    - debug:\n        msg: \"{{ output.stdout }}\"\n```\n\n## Gathering Facts\n\n### Gathering Facts for All Hosts\n\n```bash\nansible all -m setup\n```\n\n### Gathering Facts for a Specific Host\n\n```bash\nansible all -m setup -a \"filter=ansible_eth*\"\n```\n\n### Gathering Facts for a Specific Host and Saving to a File\n\n```bash\nansible all -m setup -a \"filter=ansible_eth*\" --tree /tmp/facts\n```\n\n## Variables\n\n### Setting a Variable\n\n```yaml\n---\n- name: Setting a Variable\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: Setting a Variable\n      debug:\n        var: my_var\n    - name: Setting a Variable (debug)\n      debug:\n        msg: \"{{ my_var }}\"\n```\n\n### Setting a Variable with Multiple Lines\n\n```yaml\n---\n- name: Setting a Variable with Multiple Lines\n  hosts: localhost\n  vars:\n    my_var: \u003e\n      Hello\n      World!\n  tasks:\n    - name: Setting a Variable with Multiple Lines\n      debug:\n        var: my_var\n    - name: Setting a Variable with Multiple Lines (debug)\n      debug:\n        msg: \"{{ my_var }}\"\n```\n\n### Setting a Variable with Multiple Lines and Indentation\n\n```yaml\n---\n- name: Setting a Variable with Multiple Lines and Indentation\n  hosts: localhost\n  vars:\n    my_var: |\n      Hello\n      World!\n        This is indented.\n  tasks:\n    - name: Setting a Variable with Multiple Lines and Indentation\n      debug:\n        var: my_var\n    - name: Setting a Variable with Multiple Lines and Indentation (debug)\n      debug:\n        msg: \"{{ my_var }}\"\n```\n\n## Conditionals\n\n### When\n\n```yaml\n---\n- name: When\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: When\n      debug:\n        msg: \"Hello World!\"\n      when: my_var == 123\n```\n\n### When with Multiple Conditions\n\n```yaml\n---\n- name: When with Multiple Conditions\n  hosts: localhost\n  vars:\n    my_var: 123\n  tasks:\n    - name: When with Multiple Conditions\n      debug:\n        msg: \"Hello World!\"\n      when:\n        - my_var == 123\n        - my_var != 456\n```\n\n## Loops\n\n### Looping Over a List\n\n```yaml\n---\n- name: Looping Over a List\n  hosts: localhost\n  vars:\n    my_list:\n      - 123\n      - 456\n      - 789\n  tasks:\n    - name: Looping Over a List\n      debug:\n        msg: \"{{ item }}\"\n      loop: \"{{ my_list }}\"\n```\n\n### Looping Over a Dictionary\n\n```yaml\n---\n- name: Looping Over a Dictionary\n  hosts: localhost\n  vars:\n    my_dict:\n      key1: 123\n      key2: 456\n      key3: 789\n  tasks:\n    - name: Looping Over a Dictionary\n      debug:\n        msg: \"{{ item.key }}: {{ item.value }}\"\n      loop: \"{{ my_dict | dict2items }}\"\n```\n\n### Looping Over a Dictionary Using \"with_dict\"\n\n```yaml\n---\n- name: Looping Over a Dictionary with Nested Items\n  hosts: localhost\n  vars:\n    my_dict:\n      key1:\n        - 123\n        - 456\n        - 789\n      key2:\n        - 123\n        - 456\n        - 789\n      key3:\n        - 123\n        - 456\n        - 789\n  tasks:\n    - name: Looping Over a Dictionary with Nested Items\n      debug:\n        msg: \"Key: {{ item.key }}, Values: {{ item.value }}\"\n      with_dict: \"{{ my_dict }}\"\n```\n\n### Looping Over a List with \"with_items\"\n\n```yaml\n---\n- name: Looping Over a List with with_items\n  hosts: localhost\n  vars:\n    my_list:\n      - 123\n      - 456\n      - 789\n  tasks:\n    - name: Looping Over a List with with_items\n      debug:\n        msg: \"{{ item }}\"\n      with_items: \"{{ my_list }}\"\n```\n\n## Handlers\n\n### Using Handlers\n\n```yaml\n---\n- name: Using Handlers\n  hosts: localhost\n  tasks:\n    - name: Using Handlers\n      debug:\n        msg: \"Hello World!\"\n      notify: My Handler\n  handlers:\n    - name: My Handler\n      debug:\n        msg: \"This is my handler.\"\n```\n\n### Using Handlers with Multiple Tasks\n\n```yaml\n---\n- name: Using Handlers with Multiple Tasks\n  hosts: localhost\n  tasks:\n    - name: Using Handlers with Multiple Tasks\n      debug:\n        msg: \"Hello World!\"\n      notify: My Handler\n    - name: Using Handlers with Multiple Tasks\n      debug:\n        msg: \"Hello World!\"\n      notify: My Handler\n  handlers:\n    - name: My Handler\n      debug:\n        msg: \"This is my handler.\"\n```\n\n### Using Handlers with Multiple Tasks and Different Handlers\n\n```yaml\n---\n- name: Using Handlers with Multiple Tasks and Different Handlers\n  hosts: localhost\n  tasks:\n    - name: Using Handlers with Multiple Tasks and Different Handlers\n      debug:\n        msg: \"Hello World!\"\n      notify: My Handler 1\n    - name: Using Handlers with Multiple Tasks and Different Handlers\n      debug:\n        msg: \"Hello World!\"\n      notify: My Handler 2\n  handlers:\n    - name: My Handler 1\n      debug:\n        msg: \"This is my handler 1.\"\n    - name: My Handler 2\n      debug:\n        msg: \"This is my handler 2.\"\n```\n\n## Conditional Execution\n\n### Using \"ignore_errors\" to Continue Execution Even After Failures\n  \n```yaml\n---\n- name: Using ignore_errors to Continue Execution Even After Failures\n  hosts: localhost\n  tasks:\n    - name: Using ignore_errors to Continue Execution Even After Failures\n      command: /bin/false\n      ignore_errors: yes\n    - name: Using ignore_errors to Continue Execution Even After Failures\n      debug:\n        msg: \"Hello World!\"\n```\n\n### Using \"changed_when\" to Control When a Task Is Considered Changed\n  \n```yaml\n---\n- name: Using changed_when to Control When a Task Is Considered Changed\n  hosts: localhost\n  tasks:\n    - name: Using changed_when to Control When a Task Is Considered Changed\n      command: /bin/false\n      register: output\n      changed_when: output.rc != 2\n    - name: Using changed_when to Control When a Task Is Considered Changed\n      debug:\n        msg: \"Hello World!\"\n```\n\n### Using \"failed_when\" to Control When a Task Is Considered Failed\n  \n```yaml\n---\n- name: Example playbook with failed_when\n  hosts: localhost\n  tasks:\n    - name: Example playbook with failed_when (will fail)\n      command: /bin/false\n      register: output\n      # The normal exit code for /bin/false is 1             \n      failed_when: output.rc == 2\n    - name: Example playbook with failed_when\n      debug:\n        msg: \"Hello World!\"\n```\n\n### Failing a Playbook with \"fail\"\n\n```yaml\n---\n- name: Failing a Playbook with fail\n  hosts: localhost\n  tasks:\n    - name: Failing a Playbook with fail\n      fail:\n        msg: \"This task will always fail.\"\n```\n\n## Vault\n\n### Editing an Encrypted File\n\n```bash\nansible-vault edit file.yml\n```\n\n### Updating Encryption Password\n\n```bash\nansible-vault rekey file.yml\n```\n\n### Viewing an Encrypted File\n\n```bash\nansible-vault view file.yml\n```\n\n### Encrypting a File\n\n```bash\nansible-vault encrypt file.yml\n```\n\n### Encrypting a File with a Password File\n\n```bash\nansible-vault encrypt file.yml --vault-password-file ~/.vault_pass.txt\n```\n\n### Decrypting a File\n\n```bash\nansible-vault decrypt file.yml\n```\n\n### Encrypting a String\n\n```bash\nansible-vault encrypt_string \"Hello World!\" --name \"my_var\"\n```\n\n### Encrypting a String with a Password File\n\n```bash\nansible-vault encrypt_string \"Hello World!\" --name \"my_var\" --vault-password-file ~/.vault_pass.txt\n```\n\n## Asynchronous Tasks\n\n### Running a Task Asynchronously\n\n```yaml\n---\n- name: Running a Task Asynchronously\n  hosts: localhost\n  tasks:\n    - name: Running a Task Asynchronously\n      command: /bin/bash -c \"for i in `seq 1 5`; do echo $i; sleep 1; done\"\n      async: 60\n      poll: 0\n```\n\n### Checking the Status of Asynchronous Tasks\n\n```yaml\n---\n- name: Rolling Update with Timeout\n  hosts: localhost\n  tasks:\n    - name: Start the application update (async)\n      command: /bin/bash -c \"for i in `seq 1 5`; do echo $i; sleep 1; done\"\n      async: 60\n      poll: 0 \n      register: update_result\n\n    - name: Wait for the update to complete\n      async_status:\n        jid: \"{{ update_result.ansible_job_id }}\"\n      register: job_result\n      until: job_result.finished\n      retries: 60  # Check the status every 10 seconds (60 times)\n\n    - name: Check if the update was successful\n      debug:\n        msg: \"Update successful\"\n      when: job_result.finished                           \n```\n\n## Roles\n\n### Creating a Role\n\n```bash\nansible-galaxy init my_role\n```\n\n### Using a Role\n\n```yaml\n---\n- name: Using a Role\n  hosts: localhost\n  roles:\n    - my_role\n```\n\n### Using a Role with Variables\n\n```yaml\n---\n- name: Using a Role with Variables\n  hosts: localhost\n  roles:\n    - role: my_role\n      vars:\n        my_var: 123\n```\n\n### Using a Role with Multiple Variables\n\n```yaml\n---\n- name: Using a Role with Multiple Variables\n  hosts: localhost\n  roles:\n    - role: my_role\n      vars:\n        my_var1: 123\n        my_var2: 456\n```\n\n### Using a Role with Tags\n\n```yaml\n---\n- name: Using a Role with Tags\n  hosts: localhost\n  roles:\n    - role: my_role\n      tags:\n        - install\n        - configure\n```\n\n## Ansible Galaxy\n\n### Searching for Roles\n\n```bash\nansible-galaxy search nginx\n```\n\n### Installing a Role\n\n```bash\nansible-galaxy install nginx\n```\n\n### Installing a Role with a Specific Version\n\n```bash\nansible-galaxy install elastic.elasticsearch,7.15.0\n```\n\n## Ansible Collections\n\n### Installing a Collection\n\n```bash\nansible-galaxy collection install community.general\n```\n\n### Installing a Collection with a Specific Version\n\n```bash\nansible-galaxy collection install community.general:8.1.0\n```\n\n### Installing a Collection from a File\n\n```bash\nansible-galaxy collection install community.general-8.1.0.tar.gz\n```\n\n### Installing a Collection from a Directory\n\n```bash\nansible-galaxy collection install community.general-8.1.0/\n```\n\n## Resources About Ansible\n\n### Official Ansible Documentation\n\n- [Ansible Documentation](https://docs.ansible.com/ansible/latest/index.html)\n\n### Ansible Blogs and Articles\n\n- [Ansible Blogs](https://www.ansible.com/blog)\n- [Ansible Articles on Red Hat Developer](https://developers.redhat.com/topics/automation/all)\n\n### Ansible Community and Forums\n\n- [Ansible Community](https://www.ansible.com/community)\n- [Ansible Mailing List](https://groups.google.com/g/ansible-project)\n- [Ansible Subreddit](https://www.reddit.com/r/ansible/)\n\n### Ansible GitHub Repository\n\n- [Ansible Organization on GitHub](https://github.com/ansible)\n- [Ansible GitHub Repository](https://github.com/ansible/ansible)\n\n### Ansible Videos\n\n- [Ansible YouTube Channel](https://www.youtube.com/@AnsibleAutomation)\n\n### Ansible Tools\n\n- [ansible/awx](https://github.com/ansible/awx): AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for the Red Hat Ansible Automation Platform.\n- [ansible-semaphore/semaphore](https://github.com/ansible-semaphore/semaphore): A modern UI for Ansible.\n- [ansible/molecule](https://github.com/ansible/molecule): Molecule aids in the development and testing of Ansible content: collections, playbooks, and roles.\n- [dev-sec/ansible-collection-hardening](https://github.com/dev-sec/ansible-collection-hardening): This Ansible collection provides battle-tested hardening for Linux, SSH, nginx, MySQL.\n- [ansible/ansible-lint](https://github.com/ansible/ansible-lint): ansible-lint checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you.\n- [fboender/ansible-cmdb](https://github.com/fboender/ansible-cmdb): Generate a host overview from ansible fact gathering output.\n- [willthames/ansible-inventory-grapher](https://github.com/willthames/ansible-inventory-grapher): ansible-inventory-grapher creates a dot file suitable for use by graphviz.\n- [ansible/ansible-lint](https://github.com/ansible/ansible-lint): ansible-lint checks playbooks for practices and behavior that could potentially be improved and can fix some of the most common ones for you.\n- [groupon/ansible-silo](https://github.com/groupon/ansible-silo): Ansible in a self-contained environment via Docker.\n- [pearofducks/ansible-vim](https://github.com/pearofducks/ansible-vim): A vim plugin for syntax highlighting Ansible's common filetypes.\n- [nickjj/ansigenome](https://github.com/nickjj/ansigenome): A tool to help you gather information and manage your Ansible roles.\n- [ansible-community/ara](https://github.com/ansible-community/ara): ARA Records Ansible and makes it easier to understand and troubleshoot.\n- [mitogen-hq/mitogen](https://github.com/mitogen-hq/mitogen): Distributed self-replicating programs in Python ([Mitogen for Ansible](https://mitogen.networkgenomics.com/ansible_detailed.html) is a completely redesigned UNIX connection layer and module runtime for Ansible.)\n- [Phansible](https://github.com/phansible/phansible): Phansible - generate Vagrant + Ansible dev environments for PHP.\n- [cidrblock/td4a](https://github.com/cidrblock/td4a): Template designer for automation.\n- [adammck/terraform-inventory](https://github.com/adammck/terraform-inventory): Terraform State → Ansible Dynamic Inventory.\n- [ansible-community/ansible-bender](https://github.com/ansible-community/ansible-bender): This tool bends containers using Ansible playbooks and turns them into container images.\n- [pixiu-io/kubez-ansible](https://github.com/pixiu-io/kubez-ansible): To provide quick deployment tools for Kubernetes clusters and cloud-native applications by Ansible.\n- [apenella/go-ansible](https://github.com/apenella/go-ansible): Go-ansible is a Go package that enables the execution of ansible-playbook or ansible commands directly from Golang applications.\n- [ansible/ansible-runner](https://github.com/ansible/ansible-runner): A tool and Python library that helps when interfacing with Ansible directly or as part of another system, whether that be through a container image interface, as a standalone tool, or as a Python module that can be imported.\n\n### IDE Extensions\n\n#### VSCode\n\n- [Ansible extension by Red Hat](https://marketplace.visualstudio.com/items?itemName=redhat.ansible) - This extension provides comprehensive Ansible language support, including syntax highlighting, auto-completion, and integrated linting.\n- [YAML Support](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml) - This extension offers enhanced YAML language support with features like schema validation, auto-completion, and hover documentation.\n- [ansible-vault](https://marketplace.visualstudio.com/items?itemName=dhoeric.ansible-vault) - This extension facilitates the encryption and decryption of Ansible Vault files directly within VSCode, streamlining the process of managing sensitive data.\n\n#### PyCharm\n\n- [Ansible support](https://plugins.jetbrains.com/plugin/14893-ansible) - This plugin provides support for Ansible directly in PyCharm with features such as playbook run configurations, syntax highlighting, and completion for Ansible keywords.\n\n#### Sublime\n\n- [Ansible](https://packagecontrol.io/packages/Ansible) - This package enhances Sublime Text with Ansible syntax highlighting, code snippets, and completions for a better development experience.\n- [GitGutter](https://packagecontrol.io/packages/GitGutter) - This package shows information about files in a git repository, including changes and line modifications directly in the editor.\n- [SideBarEnhancements](https://packagecontrol.io/packages/SideBarEnhancements) - This package provides enhancements to the operations on the Sidebar of Files and Folders, improving file management in Sublime Text.\n- [Sublime Linter](https://packagecontrol.io/packages/SublimeLinter) - This package is a code-linting framework for Sublime Text 3, helping to identify syntax errors and stylistic issues.\n- [Pretty YAML](https://packagecontrol.io/packages/Pretty%20YAML) - This package prettifies YAML for Sublime Text 2 and 3, making YAML files easier to read and edit.\n- [Yamllint](https://packagecontrol.io/packages/SublimeLinter-contrib-yamllint) - This package is a Sublime wrapper around yamllint, integrating YAML linting into Sublime Text.\n\n#### Vim\n\n- [Ansible-vim](https://github.com/pearofducks/ansible-vim) - This is a Vim plugin for syntax highlighting Ansible's common file types.\n\n### Newsletters\n\n- [Ansible The Bullhorn](https://forum.ansible.com/c/news/bullhorn/17)\n- [DevOpsLinks](https://faun.dev/newsletter/devopslinks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feon01%2Fansiblecheatsheet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feon01%2Fansiblecheatsheet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feon01%2Fansiblecheatsheet/lists"}