Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Ansible Interview Questions and Answer – Part 2

  1. What is the purpose and location of ansible.cfg file.
  2. Name any two settings from anible.cfg file.
  3. Please write below a sample inventory file with host, group & group of groups syntax in it.
  4. What is the diffrence between group_vars & host_vars directory?
  5. What are adhocs commands used for & write below syntax of a ad hocs command?
  6. Write below ad hoc command to gather fact varibales on all the hosts from the inventory file?
  7. What format does ansible ad hoc command returns the output?
  8. Name three types of modules in ansible?
  9. Name any 10 modules in ansible that you have used.
  10. How to list all the ansible core modules from command line.
  11. How to display all the options/attributes for apt module from command line.
  12. How can you check mandatory option for any module from command line?
  13. What is setup module used for?
  14. Write down sample global play declaration
  15. Write down any two tasks from playbook with its proper format and names.
  16. Whats is the diffrence between sudo and become module and its purpose.
  17. Write down playbook syntax of starting ntp service on webserver and dbservers host group at once.
  18. How to take user input from a playbook?
  19. What is debug module used for in playbooks?
  20. How to store output of any task into a varible from playbook?
Rajesh Kumar
Follow me
Latest posts by Rajesh Kumar (see all)