Merge branch 'master' of github.com:bregman-arie/devops-exercises

This commit is contained in:
abregman 2021-09-27 00:35:06 +03:00
commit 8a510bb304
4 changed files with 40 additions and 10 deletions

View File

@ -4719,7 +4719,7 @@ additional check is implemented or explicit names are provided) while other tool
<summary>How do you list all modules and how can you see details on a specific module?</summary><br><br> <summary>How do you list all modules and how can you see details on a specific module?</summary><br><br>
1. Ansible online docs 1. Ansible online docs
2. `ansible-doc -l` for list of modules and `ansible [module_name]` for detailed information on a specific module 2. `ansible-doc -l` for list of modules and `ansible-doc [module_name]` for detailed information on a specific module
</b></details> </b></details>
#### Ansible - Inventory #### Ansible - Inventory
@ -5583,6 +5583,35 @@ The Terraform Registry provides a centralized location for official and communit
It is also common in the community to use a tool called <code>terragrunt</code> to explicitly inject variables between modules. It is also common in the community to use a tool called <code>terragrunt</code> to explicitly inject variables between modules.
</b></details> </b></details>
<details>
<summary>What is Terraform import?</summary><br><b>
Terraform import is used to import existing infrastucture. It allows you to bring resources created by some other means (eg. manually launched cloud resources) and bring it under Terraform management.
</b></details>
<details>
<summary>How do you import existing resource using Terraform import?</summary><br><b>
1. Identify which resource you want to import.
2. Write terraform code matching configuration of that resource.
3. Run terraform command <code>terraform import RESOURCE ID</code><br>
eg. Let's say you want to import an aws instance. Then you'll perform following:
1. Identify that aws instance in console
2. Refer to it's configuration and write Terraform code which will look something like:
```
resource "aws_instance" "tf_aws_instance" {
ami = data.aws_ami.ubuntu.id
instance_type = "t3.micro"
tags = {
Name = "import-me"
}
}
```
3. Run terraform command <code>terraform import aws_instance.tf_aws_instance i-12345678</code>
</b></details>
## Containers ## Containers
### Containers Exercises ### Containers Exercises

View File

@ -27,7 +27,7 @@ kubectl get ns
<details> <details>
<summary>List all the pods in the namespace 'neverland'</code></summary><br><b> <summary>List all the pods in the namespace 'neverland'</code></summary><br><b>
kubectl get ns -n neverland kubectl get po -n neverland
</b></details> </b></details>
<details> <details>

View File

@ -4,7 +4,7 @@ Answer the questions given the following program (without running it):
``` ```
#include<stdio.h> #include<stdio.h>
#include <unistd.h>
int main() int main()
{ {
fork(); fork();

View File

@ -4,6 +4,7 @@ Answer the questions given the following program (without running it):
``` ```
#include<stdio.h> #include<stdio.h>
#include <unistd.h>
int main() int main()
{ {