---
tags:
- devops
- l1
- flashcard-deck
- ansible-core
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [Ansible](../../../../library/portal/topics.md) | **Domain:** DevOps & Tooling
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
ansible-core/01e798c36169	ansible-core	medium	ansible, module	Explain the use of the -vvv option when running Ansible commands.	The -vvv option is used to enable maximum verbosity when running Ansible commands. It produces highly detailed output, including information about each task and the status of module execution, aiding in debugging.\n\nRemember: -v = basic, -vv = more detail, -vvv = connection debugging, -vvvv = adds connection plugin output. Start with -v and increase as needed.	projects/knowledge/interview/ansible/085-explain-the-use-of-the-vvv-option-when-running-ans.txt
ansible-core/048086585364	ansible-core	easy	ansible, fundamentals	"What is an Ansible ""inventory""?"	A file that defines the managed nodes and their groups.\n\nRemember: inventory = 'who to manage.' Playbook = 'what to do.' Together they answer 'do what, to whom.'\n\nExample: [webservers]\nweb1.example.com\nweb2.example.com ansible_port=2222	projects/knowledge/interview/ansible/136-ansible-inventory.txt
ansible-core/0e3e97af9713	ansible-core	medium	ansible, module	What are Ansible Modules?	Ansible Modules are standalone scripts or programs that Ansible executes to perform specific tasks on managed nodes. Modules handle tasks such as package installation, file manipulation, and service management.\n\nExample: the copy module transfers files, service manages daemons, yum/apt handles packages, and template renders Jinja2 configs on remote hosts.\n\nRemember: modules = 'the verbs of Ansible.' apt installs packages, copy moves files, service manages daemons.\n\nExample: ansible all -m ping is an ad-hoc command using the ping module — tests connectivity without a playbook.	projects/knowledge/interview/ansible/053-what-are-ansible-modules.txt
ansible-core/142b237bf7d3	ansible-core	easy	ansible, fundamentals	What is Ansible and how does it work?	"Ansible is an open-source IT automation tool for configuration management, provisioning, and deployment. It's agentless – the control node connects over SSH/WinRM to managed nodes and executes ""modules"" (tasks) to bring systems to a desired state.\n\nRemember: Ansible = 'Agentless, No daemons, SSH-based, Idempotent, YAML-driven.' Mnemonic: 'A Nice Simple Infrastructure Language.'\n\nName origin: from Ursula K. Le Guin's novel — an 'ansible' is a device for instantaneous communication across any distance."	projects/knowledge/interview/ansible/133-what-is-ansible.txt
ansible-core/1979239e32ae	ansible-core	hard	ansible, scenario	Ansible in a Multi-Cloud Environment	To manage multi-cloud environments, I would use dynamic inventories and cloud-specific modules for each provider (AWS, Azure, GCP).\n\nExample using multiple dynamic inventories:\n\n```\nplugin: aws_ec2\nregions:\n  - us-east-1\n\nplugin: azure_rm\n```\n\n```\nansible-playbook -i aws_ec2.yml -i azure_rm.yml playbook.yml\n```\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/126-ansible-in-a-multi-cloud-environment-scenario-you-.txt
ansible-core/1a899f407caf	ansible-core	hard	ansible, scenario	What are idempotency issues in infrastructure automation and how are they avoided?	Idempotency means that running a task multiple times should have the same effect as running it once. To identify and fix idempotency issues:\n\nIdentify the Task: Determine which task is causing the issue by reviewing the output of ansible-playbook with the -v (verbose) flag.\n\nAnalyze the Task: Check if the task is correctly checking for the desired state before making changes. For example, ensure that file changes, service restarts, or package installations are conditional.\n\nRemember: idempotent = 'run it 100 times, same result as once.' Like pressing an elevator button — pressing it again doesn't call a second elevator.	projects/knowledge/interview/ansible/118-idempotency-issues-scenario-during-a-deployment-yo.txt
ansible-core/23ce866ac2fc	ansible-core	medium	ansible, inventory	How does Ansible use scripts for dynamic inventory?	Ansible executes external scripts, typically written in Python or any executable language, to fetch dynamic inventory information. These scripts should output JSON-formatted data describing hosts and groups.\n\nExample: a Python script querying AWS EC2 API returns JSON with host groups. Ansible calls it with --list and --host flags. Modern practice prefers inventory plugins over scripts.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/063-how-does-ansible-use-scripts-for-dynamic-inventory.txt
ansible-core/25308a6a8608	ansible-core	medium	ansible, module	"Explain how you can use the ""ansible-doc"" command to get help on a module."	The ansible-doc command provides documentation for Ansible modules. To get help for a specific module, use:\n```bash\nansible-doc <module_name>\n```\nIt displays module documentation, including parameters, examples, and usage.\n\nRemember: ansible-doc is your offline reference. ansible-doc -l lists all modules. ansible-doc -s module shows a short snippet of required parameters.	projects/knowledge/interview/ansible/075-explain-how-you-can-use-the-ansible-doc-command-to.txt
ansible-core/26be73f3201e	ansible-core	medium	ansible, module	How can you troubleshoot issues related to network modules in Ansible?	Troubleshoot by:\n* Checking module documentation for device compatibility.\n* Verifying device connectivity.\n* Examining module-specific logs and output.\n* Using debug modules to inspect variables and data.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/110-how-can-you-troubleshoot-issues-related-to-network.txt
ansible-core/308b20f8b986	ansible-core	easy	ansible, fundamentals	How does Ansible connect to managed nodes?	It typically uses SSH for Linux and WinRM for Windows.\n\nUnder the hood: Ansible copies Python modules to the remote host via SFTP, executes them, captures JSON output, then deletes the temp files. SSH ControlPersist multiplexing keeps connections fast.\n\nFun fact: Ansible's agentless architecture (2012) was a key differentiator — competitors like Puppet and Chef required a daemon on every node.\n\nRemember: Control Node = where Ansible runs. Managed Node = where Ansible acts. Think 'puppeteer vs. puppet.'\n\nGotcha: managed nodes need Python installed (except for raw module). Windows nodes use WinRM, not SSH.	projects/knowledge/interview/ansible/134-ansible-connection.txt
ansible-core/3d86b21e3f07	ansible-core	medium	ansible, become	How do you install Ansible on a Linux system?	On a Linux system, Ansible can be installed using package managers:\n* For Red Hat-based systems: sudo yum install ansible\n* For Debian-based systems: sudo apt-get install ansible\n\nGotcha: pip install ansible installs the latest version with all collections. pip install ansible-core installs just the core engine with minimal collections, giving you control over what's included.\n\nGotcha: pip install ansible installs all collections (~7000 modules). pip install ansible-core installs just the engine with minimal collections — better for production control.	projects/knowledge/interview/ansible/038-how-do-you-install-ansible-on-a-linux-system.txt
ansible-core/4811be13d414	ansible-core	easy	ansible, ad-hoc, commands	How do you execute a single ad-hoc Ansible command?	"Using the ansible command. For example: ansible all -m ping will run the ""ping"" module on all hosts in the inventory (useful for quick tasks or to test connectivity).\n\nExample: ansible webservers -m apt -a 'name=nginx state=present' -b installs nginx on all webservers with sudo (-b = become). Ad-hoc commands are great for one-off tasks.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it."	projects/knowledge/interview/ansible/140-ad-hoc-command.txt
ansible-core/4d906ff11d82	ansible-core	medium	ansible, module	How do you list all modules and how can you see details on a specific module?	1. Ansible online docs\n2. `ansible-doc -l` for list of modules and `ansible-doc [module_name]` for detailed information on a specific module\n\nGotcha: ansible-doc -l | wc -l shows 7,000+ modules across all collections. Filter with ansible-doc -l -t module | grep aws to find AWS-specific modules.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/006-how-do-you-list-all-modules-and-how-can-you-see-de.txt
ansible-core/5ecec28a88b5	ansible-core	medium	ansible, module	How does Ansible support network automation?	Ansible supports network automation by providing modules for configuring network devices. It can automate tasks like updating device configurations, managing VLANs, and deploying changes across a network infrastructure.\n\nExample: modules like ios_config (Cisco), junos_config (Juniper), and eos_config (Arista) push configs to devices. Network modules often use network_cli or netconf connections instead of SSH+Python.\n\nRemember: Ansible network automation uses specialized connection types (network_cli, httpapi, netconf) instead of standard SSH + Python, because network devices often lack Python.	projects/knowledge/interview/ansible/077-how-does-ansible-support-network-automation.txt
ansible-core/6c39b9cb4fd9	ansible-core	easy	ansible, architecture	"What is a ""Managed Node""?"	A target device or server managed by Ansible.\n\nRemember: Control Node = where Ansible runs. Managed Node = where Ansible acts. Think 'puppeteer vs. puppet.'\n\nGotcha: managed nodes need Python installed (except for raw module). Windows nodes use WinRM, not SSH.\n\nExample: your laptop (control node) runs ansible-playbook, which SSHs into 50 web servers (managed nodes).	projects/knowledge/interview/ansible/147-managed-node.txt
ansible-core/6d7bc5d645b9	ansible-core	hard	ansible, scenario	Handling Secret Management	"For managing sensitive information in Ansible, I use Ansible Vault. Ansible Vault allows you to encrypt sensitive data within YAML files.\n\nTo encrypt a file:\n\n```\nansible-vault encrypt secrets.yml\n```\n\nTo use the encrypted secrets in a playbook:\n\n```\n- hosts: all\n  vars_files:\n    - secrets.yml\n  tasks:\n    - name: Use secret API key\n      uri:\n        url: ""https://api.example.com/data""\n        headers:\n          Authorization: ""Bearer {{ api_key }}""\n\n```\n\nTo run the playbook with the vault password:\n\n```\nansible-playbook playbook.yml --ask-vault-pass\n```\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it."	projects/knowledge/interview/ansible/117-handling-secret-management-scenario-you-need-to-ma.txt
ansible-core/7d34152ba018	ansible-core	medium	ansible, module	"Explain the purpose of the ""copy"" module in Ansible."	The copy module is used to copy files from the Ansible controller to remote nodes. It can also set file permissions and ownership during the copy operation.\n\nExample: - copy: src=files/nginx.conf dest=/etc/nginx/nginx.conf owner=root mode=0644 notify: restart nginx\n\nGotcha: for large files, use synchronize (rsync wrapper) instead of copy — copy loads the entire file into memory on the control node.	projects/knowledge/interview/ansible/056-explain-the-purpose-of-the-copy-module-in-ansible.txt
ansible-core/7e014aad7899	ansible-core	medium	ansible, module	Give examples of commonly used Ansible Modules.	* yum Module: Manages packages on Red Hat-based systems.\n* apt Module: Manages packages on Debian-based systems.\n* copy Module: Copies files to remote nodes.\n* service Module: Manages services on the system.\n* shell Module: Executes shell commands on the remote node.\n\nRemember: the 'big five' Ansible modules: apt/yum (packages), copy/template (files), service/systemd (daemons). Master these and you cover 80% of tasks.	projects/knowledge/interview/ansible/054-give-examples-of-commonly-used-ansible-modules.txt
ansible-core/7f4ac24d73c6	ansible-core	easy	ansible, inventory	What is the Ansible inventory?	The inventory is a list of managed hosts (and groups of hosts) that Ansible operates on. It can be a static INI/JSON/YAML inventory file or dynamic inventory script, defining hostnames, groups, and connection info.\n\nRemember: inventory = 'who to manage.' Playbook = 'what to do.' Together they answer 'do what, to whom.'\n\nExample: [webservers]\nweb1.example.com\nweb2.example.com ansible_port=2222	projects/knowledge/interview/ansible/138-what-is-inventory.txt
ansible-core/845b3e3b474a	ansible-core	medium	ansible, connection	How do you set up passwordless SSH for Ansible?	Generate SSH keys using ssh-keygen on the Ansible controller, and copy the public key (~/.ssh/id_rsa.pub) to the ~/.ssh/authorized_keys file on managed nodes.\n\nGotcha: use ssh-copy-id user@host to automate key distribution. For large fleets, bake the public key into your base image or use a configuration management bootstrap.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/041-how-do-you-set-up-passwordless-ssh-for-ansible.txt
ansible-core/84bb610e6f9c	ansible-core	medium	ansible, connection	How can you troubleshoot SSH connection issues with Ansible?	Troubleshoot SSH issues by checking:\n* SSH key permissions.\n* User permissions on the target system.\n* Connectivity between the Ansible controller and target.\n* SSH configuration on the target system.\n* Security groups or firewalls blocking SSH traffic.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/096-how-can-you-troubleshoot-ssh-connection-issues-wit.txt
ansible-core/8c34259d551d	ansible-core	easy	ansible, inventory	What is an inventory file and how do you define one?	An inventory file defines hosts and/or groups of hosts on which Ansible tasks executed upon.\n\nAn example of inventory file:\n\n```\n192.168.1.2\n192.168.1.3\n192.168.1.4\n\n[web_servers]\n190.40.2.20\n190.40.2.21\n190.40.2.22\n```\n\nExample: [webservers]\nweb1.example.com\nweb2.example.com ansible_port=2222\n\n[dbservers]\ndb1.example.com. Groups can nest: [prod:children]\nwebservers\ndbservers.\n\nRemember: inventory = 'who to manage.' Playbook = 'what to do.' Together they answer 'do what, to whom.'\n\nExample: [webservers]\nweb1.example.com\nweb2.example.com ansible_port=2222	projects/knowledge/interview/ansible/007-what-is-an-inventory-file-and-how-do-you-define-on.txt
ansible-core/8c350949a63b	ansible-core	easy	ansible, inventory	What is a dynamic inventory file? When you would use one?	A dynamic inventory file tracks hosts from one or more sources like cloud providers and CMDB systems.\n\nYou should use one when using external sources and especially when the hosts in your environment are being automatically \nspun up and shut down, without you tracking every change in these sources. projects/knowledge/interview/ansible/008-what-is-a-dynamic-inventory-file-when-you-would-us.txt\n\nExample: AWS EC2 plugin queries the AWS API and auto-discovers instances by tags, regions, or VPCs — no static hosts file needed.\n\nRemember: dynamic inventory = 'ask the cloud who exists right now' instead of maintaining a static list.	
ansible-core/8e3bc6d595cd	ansible-core	medium	ansible, module	What are specific challenges you might face when using Ansible for network automation?	Challenges include:\n* Vendor-specific syntax and module support.\n* Managing device state changes.\n* Handling varied device responses.\n* Ensuring network reliability for automation tasks.\n\nGotcha: network devices often lack Python, requiring the raw module or specialized connection types (network_cli, httpapi, netconf) instead of standard SSH + Python.\n\nRemember: Ansible network automation uses specialized connection types (network_cli, httpapi, netconf) instead of standard SSH + Python, because network devices often lack Python.	projects/knowledge/interview/ansible/109-what-are-specific-challenges-you-might-face-when-u.txt
ansible-core/961dc13d20a9	ansible-core	medium	ansible, idempotence, modules	"What does it mean for an Ansible module to be ""idempotent""?"	Idempotence means running the module multiple times yields the same result – the module only makes changes if the target state isn't already achieved. Most Ansible modules are designed to be idempotent (so you can run playbooks repeatedly without causing unintended changes).\n\nRemember: idempotent = 'run it 100 times, same result as once.' Like pressing an elevator button — pressing it again doesn't call a second elevator.	projects/knowledge/interview/ansible/142-idempotence.txt
ansible-core/9f44155b421e	ansible-core	medium	ansible, fundamentals	"What is ""idempotency"" in Ansible?"	Ensuring that applying a configuration multiple times has the same result.\n\nRemember: idempotent = 'run it 100 times, same result as once.' Like pressing an elevator button — pressing it again doesn't call a second elevator.\n\nExample: apt: name=nginx state=present installs nginx if missing, does nothing if already installed. That's idempotent.\n\nGotcha: shell and command modules are NOT idempotent by default — they run every time. Use creates/removes or when: to guard them.	projects/knowledge/interview/ansible/145-idempotency.txt
ansible-core/a631595217ed	ansible-core	medium	ansible, module	What is Ansible Networking, and how is it different from traditional Ansible?	Ansible Networking is an extension of Ansible designed for network automation. It includes modules tailored for network devices, supporting tasks like configuration management and device provisioning. While traditional Ansible can be used for network automation, Ansible Networking provides specialized modules and features.\n\nRemember: Ansible network automation uses specialized connection types (network_cli, httpapi, netconf) instead of standard SSH + Python, because network devices often lack Python.	projects/knowledge/interview/ansible/079-what-is-ansible-networking-and-how-is-it-different.txt
ansible-core/adfebdb357cb	ansible-core	medium	ansible, connection	How Ansible is different from other automation tools? (e.g. Chef, Puppet, etc.)	"Ansible is:\n\n* Agentless\n* Minimal run requirements (Python & SSH) and simple to use\n* Default mode is ""push"" (it supports also pull)\n* Focus on simpleness and ease-of-use\n\nUnder the hood: agentless (SSH vs. requiring daemons), push-based by default (vs. pull), YAML-based (vs. Ruby DSL for Chef/Puppet), and minimal prerequisites (just Python + SSH on targets).\n\nRemember: 'PAYS' — Push-based, Agentless, YAML, SSH. Chef/Puppet are pull-based, require agents, and use Ruby DSL."	projects/knowledge/interview/ansible/002-how-ansible-is-different-from-other-automation-too.txt
ansible-core/b5f988f9dfe7	ansible-core	medium	ansible, inventory	What is a dynamic inventory in Ansible?	A dynamic inventory in Ansible is an external script or program that generates inventory information dynamically. It allows Ansible to discover and manage nodes on-the-fly, adapting to changes in infrastructure.\n\nExample: AWS EC2 plugin queries the AWS API and auto-discovers instances by tags, regions, or VPCs — no static hosts file needed.\n\nRemember: dynamic inventory = 'ask the cloud who exists right now' instead of maintaining a static list.	projects/knowledge/interview/ansible/062-what-is-a-dynamic-inventory-in-ansible.txt
ansible-core/b616583c3c2c	ansible-core	medium	ansible, module	Why Use Ansible Collections?	- Modular and reusable components\n  - Simplifies management of custom and third-party modules\n  - Provides a standardized way to distribute automation content\n  - Helps in version control and dependency management\n\nExample: ansible-galaxy collection install community.general installs the collection. Use FQCN in tasks: community.general.ufw for the firewall module.\n\nRemember: collections replaced the old monolithic module distribution. Think of them as 'Ansible packages' with versioning.	projects/knowledge/interview/ansible/029-why-use-ansible-collections.txt
ansible-core/b81798dfabb5	ansible-core	medium	ansible, module	"How do you use the ""shell"" module in Ansible?"	"The shell module is used to execute shell commands on remote nodes. Example:\n```yaml\n- name: Run a shell command\n  shell: echo ""Hello, World!""\n```\n\nGotcha: prefer the command module over shell unless you need pipes, redirects, or shell builtins. shell spawns a full /bin/sh, adding attack surface.\n\nRemember: shell/command modules are not idempotent. Always add creates: or when: to guard against re-execution."	projects/knowledge/interview/ansible/055-how-do-you-use-the-shell-module-in-ansible.txt
ansible-core/c84d0f9d74e6	ansible-core	easy	ansible, fundamentals	"What are Ansible ""facts""?"	Dynamic system information gathered during execution.\n\nRemember: facts = auto-discovered variables about each host. Access via ansible_facts['os_family'] or {{ ansible_hostname }}.\n\nExample: ansible_facts['distribution'] returns 'Ubuntu', 'CentOS', etc. Use it in conditionals: when: ansible_facts['os_family'] == 'Debian'.\n\nGotcha: fact gathering runs the setup module on every host before tasks. Disable with gather_facts: false to speed up playbooks.	projects/knowledge/interview/ansible/139-ansible-facts.txt
ansible-core/cabf6b4fd5f5	ansible-core	medium	ansible, inventory, connection	Ansible Installation and Configuration:	* Installation: Use package managers like yum or apt on Linux systems, or install Ansible using Python's pip package manager.\n* Configuration: Ansible configurations are set in the ansible.cfg file, defining parameters like inventory location and SSH settings.\n\nGotcha: pip install ansible installs all collections (~7000 modules). pip install ansible-core installs just the engine with minimal collections — better for production control.	projects/knowledge/interview/ansible/037-ansible-installation-and-configuration.txt
ansible-core/d01f94abd993	ansible-core	medium	ansible, inventory, fact	What is an Ansible Inventory file, and how is it configured?	The Ansible Inventory file lists managed nodes and defines groups. It is usually located at /etc/ansible/hosts. Nodes can be listed by IP or hostname. Example entry: webserver ansible_host=192.168.1.10.\n\nGotcha: the default location /etc/ansible/hosts can be overridden with -i path/to/inventory or the ANSIBLE_INVENTORY environment variable. Most projects keep inventory in the repo alongside playbooks.\n\nRemember: inventory = 'who to manage.' Playbook = 'what to do.' Together they answer 'do what, to whom.'\n\nExample: [webservers]\nweb1.example.com\nweb2.example.com ansible_port=2222	projects/knowledge/interview/ansible/039-what-is-an-ansible-inventory-file-and-how-is-it-co.txt
ansible-core/e86314bcceeb	ansible-core	medium	ansible, inventory	What are common issues you might encounter with dynamic inventories, and how would you troubleshoot them?	Common issues include script errors, incomplete data, or connectivity problems. Troubleshoot by running the inventory script manually, checking script permissions, and validating output format.\n\nGotcha: always test inventory scripts with --list and --host flags manually. Enable ANSIBLE_DEBUG=1 for verbose connection and inventory troubleshooting output.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/ansible/098-what-are-common-issues-you-might-encounter-with-dy.txt
ansible-core/f29698b43230	ansible-core	medium	ansible, module	What are some common issues you might encounter with Ansible modules, and how would you troubleshoot them?	Issues include module compatibility, incorrect parameters, or module not installed. Troubleshoot by checking documentation, validating parameters, and ensuring the module is available.\n\nExample: 'module not found' usually means a missing collection — install with ansible-galaxy collection install community.general. Check module docs for required Python packages on the target.\n\nRemember: modules = 'the verbs of Ansible.' apt installs packages, copy moves files, service manages daemons.\n\nExample: ansible all -m ping is an ad-hoc command using the ping module — tests connectivity without a playbook.	projects/knowledge/interview/ansible/105-what-are-some-common-issues-you-might-encounter-wi.txt
ansible-core/f7496354ed4c	ansible-core	hard	ansible, automation, devops, risk-management	Why is Ansible more dangerous than shell scripts at scale?	"Ansible provides consistent, parallel execution of potentially wrong changes across your entire fleet.\n\nThe dangers:\n\n1. Consistent blast radius\n   - Shell script on one host = one host affected\n   - Ansible playbook = hundreds of hosts simultaneously\n   - Mistakes replicated perfectly everywhere\n\n2. Idempotent repetition of wrong state\n   - ""Idempotent"" means it enforces state consistently\n   - Wrong state enforced consistently is still wrong\n   - Running again won't fix it, will reinforce it\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it."	projects/knowledge/interview/ansible/130-ansible-dangerous-at-scale.txt
ansible-core/fe87fb67b5b1	ansible-core	medium	ansible, module	Explain the use of the ansible-doc command for module documentation.	ansible-doc provides documentation for Ansible modules. Example:\n```bash\nansible-doc module_name\n```\n\nUnder the hood: ansible-doc reads module docstrings locally — no internet required. Use ansible-doc -l for a full module list, -s for a short snippet showing required parameters.\n\nRemember: ansible-doc is your offline reference. ansible-doc -l lists all modules. ansible-doc -s module shows a short snippet of required parameters.	projects/knowledge/interview/ansible/106-explain-the-use-of-the-ansible-doc-command-for-mod.txt\n
ansible-core/441556a4ac60	ansible-core	medium	miscellaneous, ansible, control-flow, networking	Can you provide an example of a task you've automated to improve data center efficiency?	One example of a task automated for data center efficiency is the provisioning of virtual machines (VMs) based on demand. Using tools like Ansible or PowerShell, I created automation scripts that dynamically allocate and configure VMs in response to changing workloads. These scripts assess current resource utilization, determine the required capacity, and automatically spin up or down VMs accordingly. This ensures optimal resource allocation, reduces manual intervention, and improves scalability, contributing to overall data center efficiency.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	projects/knowledge/interview/miscellaneous/039-can-you-provide-an-example-of-a-task-youve-automat.txt
ansible-core/b4e87af2ea1b	ansible-core	medium	miscellaneous, ansible, control-flow, debugging	How do you approach automating repetitive tasks in a data center?	Automating repetitive tasks in a data center involves the following steps: **Task Identification:* • Identify tasks that are repetitive and time-consuming but suitable for automation. **Tool Selection:* • Choose appropriate automation tools based on the task requirements. For server management, tools like Ansible, PowerShell, or configuration management tools may be suitable. **Scripting/Playbook Development:* • Develop scripts or playbooks that automate the identified tasks. Ensure they are well-documented and modular for scalability and maintenance.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	
ansible-core/f16325393810	ansible-core	medium	miscellaneous, ansible, control-flow, functions	Provide an example of a complex task or process you automated using scripting or automation tools.	In a previous role, I automated the deployment and configuration of a multi-tiered application stack using Ansible. **Steps Taken:* •  • Infrastructure Provisioning: Wrote Ansible playbooks to automate the provisioning of virtual machines on different environments (development, testing, and production). • Software Installation: Automated the installation and configuration of various software components, including web servers, application servers, and databases, ensuring consistency across environments.\n\nRemember: Ansible's strength is simplicity — YAML playbooks, agentless SSH, and idempotent modules. When you find yourself fighting Ansible, you're probably overcomplicating it.	

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [Ansible Automation](../../../../library/topics/ansible/index.md) (Topic Pack, L1) — Ansible
- [Ansible Deep Dive](../../../../library/topics/ansible-deep-dive/index.md) (Topic Pack, L2) — Ansible
- [Ansible Drills](../../../../library/drills/ansible_drills.md) (Drill, L1) — Ansible
- Ansible Exercises (Quest Ladder) *(CLI)* (Exercise Set, L1) — Ansible
- Ansible Lab: Conditionals and Loops *(CLI)* (Lab, L1) — Ansible
- Ansible Lab: Facts and Variables *(CLI)* (Lab, L0) — Ansible
- Ansible Lab: Install Nginx (Idempotency) *(CLI)* (Lab, L1) — Ansible
- Ansible Lab: Ping and Debug *(CLI)* (Lab, L0) — Ansible
- Ansible Lab: Roles *(CLI)* (Lab, L1) — Ansible
- Ansible Lab: Templates and Handlers *(CLI)* (Lab, L1) — Ansible

<!-- wiki:related:end -->
