The Ansible Cheat Sheet - Black is a resource or reference guide that provides shortcuts, commands, and tips for using Ansible, an open-source IT automation tool. It can help users to quickly navigate and utilize Ansible's features efficiently.
Q: What is Ansible?
A: Ansible is an open-source automation tool used for IT infrastructure provisioning, configuration management, and application deployment.
Q: How does Ansible work?
A: Ansible works by connecting to remote hosts via SSH or WinRM and executing tasks or playbooks defined in YAML files.
Q: What is a playbook in Ansible?
A: A playbook is a file written in YAML format that contains a set of tasks and plays to be executed in a specific order on remote hosts.
Q: What is a task in Ansible?
A: A task is a single unit of work that Ansible performs on a remote host, such as installing a package or starting a service.
Q: What is an inventory file in Ansible?
A: An inventory file in Ansible is a text file that lists the hosts or groups of hosts on which Ansible will perform tasks.
Q: What is an Ansible module?
A: An Ansible module is a pre-defined script or code that Ansible uses to perform specific tasks on remote hosts.
Q: What is a role in Ansible?
A: In Ansible, a role is a way to organize and reuse playbooks and tasks. It provides a structured way to group related tasks and configure specific roles on remote hosts.
Q: What is idempotence in Ansible?
A: Idempotence in Ansible means that running the same playbook multiple times on the same set of hosts will result in the same desired state, regardless of the initial state.
Q: How can I install Ansible?
A: You can install Ansible by running the appropriate package manager command for your operating system. For example, on Ubuntu, you can use 'sudo apt-get install ansible'.
Q: Is Ansible only for Linux?
A: No, Ansible can also manage Windows hosts using the WinRM connection plugin.