Add a couple of Ansible questions

This commit is contained in:
abregman 2019-10-20 09:29:53 +03:00
parent 4921318f7d
commit ae829ef963

View File

@ -3,7 +3,7 @@
:information_source:  This repository contains interview questions on various DevOps related topics :information_source:  This repository contains interview questions on various DevOps related topics
:bar_chart:  There are currently **250** questions :bar_chart:  There are currently **257** questions
:warning:  You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :) :warning:  You don't need to know how to answer all the questions in this repo. DevOps is not about knowing all :)
@ -26,7 +26,7 @@
<td align="center"><a href="#aws"><img src="images/aws.png" width="120px;" height="75px;" alt="AWS"/><br /><b>AWS</b></a><br /><sub><a href="#aws-beginner">Beginner :baby:</a></sub><br><sub></td> <td align="center"><a href="#aws"><img src="images/aws.png" width="120px;" height="75px;" alt="AWS"/><br /><b>AWS</b></a><br /><sub><a href="#aws-beginner">Beginner :baby:</a></sub><br><sub></td>
<td align="center"><a href="#Network"><img src="images/network.png" width="75x;" height="75px;" alt="Network"/><br /><b>Network</b></a><br /><sub><a href="#network-beginner">Beginner :baby:</a></sub><br><sub><a href="#network-advanced">Advanced :star:</a></sub></td> <td align="center"><a href="#Network"><img src="images/network.png" width="75x;" height="75px;" alt="Network"/><br /><b>Network</b></a><br /><sub><a href="#network-beginner">Beginner :baby:</a></sub><br><sub><a href="#network-advanced">Advanced :star:</a></sub></td>
<td align="center"><a href="#linux"><img src="images/linux.png" width="75x;" height="75px;" alt="Linux"/><br /><b>Linux</b></a><br /><sub><a href="#linux-beginner">Beginner :baby:</a></sub><br><sub><a href="#linux-advanced">Advanced :star:</a></sub></td> <td align="center"><a href="#linux"><img src="images/linux.png" width="75x;" height="75px;" alt="Linux"/><br /><b>Linux</b></a><br /><sub><a href="#linux-beginner">Beginner :baby:</a></sub><br><sub><a href="#linux-advanced">Advanced :star:</a></sub></td>
<td align="center"><a href="#ansible"><img src="images/ansible.png" width="75px;" height="75px;" alt="Ansible"/><br /><b>Ansible</b></a><br /><sub><a href="#ansible-beginner">Beginner :baby:</a></sub><br><sub></td> <td align="center"><a href="#ansible"><img src="images/ansible.png" width="75px;" height="75px;" alt="Ansible"/><br /><b>Ansible</b></a><br /><sub><a href="#ansible-beginner">Beginner :baby:</a></sub><br><sub><a href="#ansible-advanced">Advanced :star:</a></sub></td>
<td align="center"><a href="#terraform"><img src="images/terraform.png" width="75px;" height="75px;" alt="Terraform"/><br /><b>Terraform</b></a><br /><sub><a href="#terraform-beginner">Beginner :baby:</a></sub><br><sub></td> <td align="center"><a href="#terraform"><img src="images/terraform.png" width="75px;" height="75px;" alt="Terraform"/><br /><b>Terraform</b></a><br /><sub><a href="#terraform-beginner">Beginner :baby:</a></sub><br><sub></td>
<td align="center"><a href="#docker"><img src="images/docker.png" width="75px;" height="75px;" alt="Docker"/><br /><b>Docker</b></a><br /><sub><a href="#docker-beginner">Beginner :baby:</a></sub><br><sub></td> <td align="center"><a href="#docker"><img src="images/docker.png" width="75px;" height="75px;" alt="Docker"/><br /><b>Docker</b></a><br /><sub><a href="#docker-beginner">Beginner :baby:</a></sub><br><sub></td>
</tr> </tr>
@ -965,7 +965,7 @@ Role Ansible roles allows you to group resources based on certain functional
</b></details> </b></details>
<details> <details>
<summary>What are some of Ansible best practices?</summary><br><b> <summary>Which Ansible best practices are you familiar with? name at least three</summary><br><b>
</b></details> </b></details>
<details> <details>
@ -1102,9 +1102,52 @@ In the context of our question, the order will be extra vars (always override an
A full list can be found at the link above. Also, note there is a significant difference between Ansible 1.x and 2.x. A full list can be found at the link above. Also, note there is a significant difference between Ansible 1.x and 2.x.
</b></details> </b></details>
<details>
<summary>For each of the following statements determine if it's true or false:
* A module is a collection of tasks
* Its better to use shell or command instead of a specific module
* Host facts override play variables
* A role might include the following: vars, meta, and handlers
* Dynamic inventory is generated by extracting information from external sources
* Its a best practice to use indention of 2 spaces instead of 4
* notify used to trigger handlers
* This “hosts: all:!controllers” means run only on controllers group hosts</summary><br><b>
</b></details>
<details>
<summary>What is ansible-pull? How its different compared to ansible-playbook?</summary><br><b>
</b></details>
<a name="ansible-advanced"></a>
#### :star: Advanced
<details>
<summary>What are filters? Do you have experience with writing filters?</summary><br><b>
</b></details>
<details>
<summary>Write a filter to capitalize a string</summary><br><b>
<code>
def cap(self, string):
return string.capitalize()
</code>
</b></details>
<details>
<summary>How do you test your Ansible based projects?</summary><br><b>
</b></details>
<details>
<summary>What are callback plugins? What can you achieve by using callback plugins?</summary><br><b>
</b></details>
## Terraform ## Terraform
<a name="terraform-beginner"></a>
#### :baby: Beginner #### :baby: Beginner
<details> <details>