Ansible Intermediate Interview Questions
  1. How do you create a custom Ansible module?
  2. How can you pass variables between plays in an Ansible playbook?
  3. What is the difference between a loop and a with_items statement in Ansible?
  4. How can you use tags in an Ansible playbook?
  5. How do you use Jinja2 templates in Ansible?
  6. How can you handle errors in an Ansible playbook?
  7. What is the purpose of the Ansible Vault?
  8. How can you use Ansible to configure network devices?
  9. How do you use Ansible with containers?
  10. What is the difference between a local_action and a delegate_to statement in Ansible?
  11. How do you use Ansible to configure Nginx?
  12. How do you use Ansible to manage Docker containers?
  13. How can you use Ansible to manage multiple environments (e.g. development, staging, production)?
  14. What is the purpose of an Ansible fact?
  15. How can you use Ansible to manage log files?
  16. How do you use Ansible to manage backups?
  17. How do you use Ansible to manage secrets?
  18. How do you use Ansible to manage infrastructure as code?
  19. What is the purpose of the Ansible Tower?
  20. How do you use Ansible to manage AWS EC2 instances?
  21. How do you use the blockinfile module to insert a block of text into a file in Ansible?
  22. How can you use the register module to store the output of a command in a variable in Ansible?
  23. How do you use the include_role statement to reuse a role in an Ansible playbook?
  24. How can you use the set_fact module to dynamically set a variable in Ansible?
  25. How do you use the git module to clone a Git repository in Ansible?
  26. How can you use the unarchive module to extract a tarball in Ansible?
  27. How do you use the debug module to print the output of a shell command in Ansible?
  28. How can you use the apt_key module to add a GPG key in Ansible?
  29. How do you use the pause module to delay execution in an Ansible playbook?
  30. How can you use the assert module to test the value of a variable in an Ansible playbook?
Ansible Interview Questions For Experienced
  1. What is the purpose of Ansible collections?
  2. How can you use Ansible to manage GCP resources?
  3. How do you use Ansible to manage Azure resources?
  4. What is the purpose of an Ansible playbook strategy?
  5. How do you use Ansible to manage large infrastructures?
  6. What is the purpose of the Ansible Test Kitchen?
  7. How do you use Ansible to manage DNS records?
  8. How can you use Ansible to perform rolling upgrades of Kubernetes clusters?
  9. How do you use Ansible to manage load testing?
  10. How can you use Ansible to manage security patches and updates?
  11. How can you use the file module to copy a file to a remote host in Ansible?
  12. How do you use the debug module to print the value of a variable in an Ansible playbook?
  13. How do you use the apt module to install packages on an Ubuntu machine in Ansible?
  14. How can you use a loop to install multiple packages in Ansible?
  15. How can you use the shell module to run a command on a remote host in Ansible?
  16. How do you use the copy module to copy a file from a remote host to the local machine in Ansible?
  17. How can you use the wait_for module to check if a service is available on a remote host in Ansible?
  18. How do you use the user module to create a new user on a remote host in Ansible?
  19. How can you use the become module to run a command with elevated privileges in Ansible?
  20. How do you use the with_fileglob statement to loop over multiple files in an Ansible playbook?
  21. How can you use the dynamic inventory plugin to dynamically generate an inventory for Ansible?
  22. How do you use the block statement to conditionally execute tasks in an Ansible playbook?
  23. How can you use the loop_control module to customize the behavior of a loop in Ansible?
  24. How do you use the import_role statement to reuse a role across multiple playbooks in Ansible?
  25. How can you use the blockinfile module to replace a block of text in a file in Ansible?
  26. How do you use the shell module to run a command with a timeout in Ansible?
  27. How can you use the script module to run a local script on a remote host in Ansible?
  28. How do you use the assert module to test the status code of an API endpoint in an Ansible playbook?
  29. How can you use the assert module to test the output of a Python script in an Ansible playbook?