InterviewSolution
| 1. |
Can you explain Ansible facts? |
|
Answer» Ansible fact is a WAY for tools to get DATA and complete information about a host and store them in the variables for their easy access. This information is stored in predefined variables that are available for use in the playbook. To generate the facts and simple techniques the setup module is as- $ Ansible- m setup hostname As soon as the statement gets executed it will print out a list of a dictionary of the facts which are available for a particular host. This is the way to access the list of available Ansible_variables. These facts can be seen as- $ Ansible all- m setup If a user wants to extract any particular part of the available information then the "set up" model can be used where an option is available to filter out the output and the facts which are required can behold. Also Read: Django INTERVIEW questions 17. What according to you is the PROPER way to make the content reusable?The Ansible files can be made reusable in following ways-
In order to break or create the number of smaller files of any huge playbook imports and includes are used. Rolls are used to organize and manage multiple tasks following a package including plugin, variables, handlers and other MODULES. By using Ansible galaxy they can also be uploaded and shared directly. |
|