GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Interview-Questions/Ansible at master · Raja-cloud/Interview-Questions Expand file tree/ Copy pathAnsibleMore file actions 214 lines (116 loc) · 6.8 KB / Copy pathAnsibleFile metadata and controls214 lines (116 loc) · 6.8 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 Ansible Interview Questions 1. What is inventory file used for and default inventory host location? The Ansible inventory file defines the hosts and groups of hosts upon which commands, modules, and tasks in a playbook operate. The file can be in one of many formats depending on your Ansible environment and plugins. The default location for the inventory file is /etc/ansible/hosts. If necessary, you can also create project-specific inventory files in alternate locations. 2. What is ansible configuration file used for and its default path? If you want to modify some settings in ansible we will use ansible configuration file. The default path will be /etc/ansible/ansible.cfg 3. Do you write your inventory file? Yes 4. How many types of variables and precedence? There are almost 16 variable precedence in ansible where extra vars have highist precedence 5. Write the command to find the python version on nodes? 6. What is the file structure of ansible roles? Ansible roles can be as complex or as simple as you need. Sometimes, it is helpful to start simple and iterate into a more complex role as you shore up the base functionality. 7. What happen when one node or instance is unreachable? 8. What happen when one task is failed in playbook? 9. I have 20 servers , I want to install one package in 5 servers and other package in next 5 servers..like that How to write in ansible script for that…Explain? 10. What is the architecture of ansible? 11. How do I supply variables while executing the playbook in ansible? 12. Explain about the tags in ansible? 13. How to execute failure playbook again? 14. How is ansible diffrent than any other configuration management tool? 15. Ansible playbooks are written in what format? 16. What is a module in Ansible? 17. What is inventory used for in ansible? 18. Name three places where ansible variables can be stored? 19. What connection anible establishes with linux and windows node. 20. Diffrence between Remote and local execution in ansible. 21. What is the purpose and location of ansible.cfg file. 22. Name any two settings from anible.cfg file. 23. Please write below a sample inventory file with host, group & group of groups syntax in it. 24. What is the diffrence between group_vars & host_vars directory? 25. What are adhocs commands used for & write below syntax of a ad hocs command? 26. Write below ad hoc command to gather fact varibales on all the hosts from the inventory file? 27. What format does ansible ad hoc command returns the output? 28. Name three types of modules in ansible? 29. Name any 10 modules in ansible that you have used. 30. How to list all the ansible core modules from command line. 31. How to display all the options/attributes for apt module from command line. 32. How can you check mandatory option for any module from command line? 33. What is setup module used for? 34. Write down sample global play declaration 35. Write down any two tasks from playbook with its proper format and names. 36. Whats is the diffrence between sudo and become module and its purpose. 37. Write down playbook syntax of starting ntp service on webserver and dbservers host group at once. 38. How to take user input from a playbook? 39. What is debug module used for in playbooks? 40. How to store output of any task into a varible from playbook? 41. What are handlers used for in ansible and how is it diffrent from tasks? 42. Conditional execution in ansible is used for what purpose and write down its syntax with small description? 43. What are templates used for and its format? 44. What are ansible roles and its purpose? 45. Command to generate ansible roles directory structure. 46. Name 5 directories from ansible roles. Ansible interview Questions 47. What is {{ }} symbol used for in ansible. 48. Write down all the places where we can define variables according to its precedence. 49. Write down syntax of dictionary variable? TRUE or FALSE 50. Setup module gets executed after executing any ad hoc command. True False 51. Anible playbooks are written in XML format. True False 52. ansible.cfg file is list of plays. True False 53. Fact variables is generated by ansible and we do not need to create fact varibales. True False 54. Anible is written in Python langueage. True False 55. 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 False 56. Ansible loop module is with_items. True False 57. All the templates in ansible roles has to be defined in main.yml file inside templates directory. True False 58. All the roles uploaded in ansible galaxy website is written and owned by Ansible inc(organization). True False 59. Ansible can only get installed on Linux machine but can manage Linux and windows nodes. True False 60. Write a Ansible task that can copy the file to remote location with the ownership of Jboss? 61. What is local action in Ansible? 62. What are the roles in Ansible? 63. Write a playbook for installation of apache in ubuntu and centos? 64.How to create a role in ansible? 65. Different types of inventories in ansible? 66. if we want system information of machine how we will get the data with ansible like we use facter in puppet ? 67. In which language we write playbooks in ansible? 68. Activity that we use with ansibles or advantage Functionality or purpose of ansible using in your project? 69. How to launch an LDAP server using ansible? 70. How ansible works.. and what are the playbook written other than the basic playbooks ? 71. For example there are 4 aps server running and 4 websers running and we have a new code change and this change should automatically copy to these different servers using ansible, how I will come to know new code is generated. Use Jenkins with POLL SCM option and after artifact is generated using ansible to push suing copy module. 72. Have u done any automation like app goes down then for self healing of the app kind of the thing. 73 .Have u written any playbook. Explain it 74. what is a dynamic inventory in ansible? 75. How can you manage cloud services with ansible? 76. How can you protect sensitive information in ansible? 77. How can you save the output of module execution in ansible? 78. How can you manage error handling? 79. what are conditionals in ansible? 80. write a playbook to create AMI on AWS? 81. How can you the fact varibales in ansible? 82. can we create an ansible module ? 83 . How can you do provisioning with ansible? 84 . BASH Vs Python Vs Configuration Management Tools? 85. How can you update a single table in a Database with ansible? 86. What type of roles you used in your playbook explain ? 87. How to create and use the Dynamic inventory ? 88. Write a playbook for installing AppDynamics and configure the agents for the same ? |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |