Ansible Interview Questions and Answer – Part 3

  1. What are handlers used for in ansible and how is it diffrent from tasks?
  2. Conditional execution in ansible is used for what purpose and write down its syntax with small description?
  3. What are templates used for and its format?
  4. What are ansible roles and its purpose?
  5. Command to generate ansible roles directory structure.
  6. Name 5 directories from ansible roles.
  7. What is {{ }} symbol used for in ansible.
  8. Write down all the places where we can define variables according to its precedence.
  9. Setup module gets executed after executing any ad hoc command. True or False
  10. Anible playbooks are written in XML format. True or False
  11. ansible.cfg file is list of plays. True or False
  12. Fact variables is generated by ansible and we do not need to create fact varibales. True or False
  13. Anible is written in Python langueage. True or False
  14. Ansible works on Master and client relationship, where ansible control server package is installed on master and ansible client package is installed on all the clients. True or False
  15. Ansible loop module is with_items. True or False
  16. All the templates in ansible roles has to be defined in main.yml file inside templates directory. True or False
  17. All the roles uploaded in ansible galaxy website is written and owned by Ansible inc(organization).
  18. Ansible can only get installed on Linux machine but can manage Linux and windows nodes. True or False
  19. Write a Ansible task that can copy the file to remote location with the ownership of Jboss?
Rajesh Kumar
Follow me