# Resumo

### Hello, I am Joao Castro :)

![Computador iuriCode](https://raw.githubusercontent.com/MicaelliMedeiros/micaellimedeiros/master/image/computer-illustration.png)

#### About Me!

🙋 Devops student

💼 Working as a IT specialist

#### ⚙️ Stack

💻 Linux ● Docker ● Kubernetes ● Ansible ● Terraform ● GitLab

⭐ VMWare ● Windows ● Openshift ● AWS ● AZURE ● GCP ● Ansible Tower

![AWS](https://img.shields.io/badge/AWS%20-%23FF9900.svg?\&style=for-the-badge\&logo=amazon-aws\&logoColor=white) ![GCP](https://img.shields.io/badge/Google_Cloud-4285F4?style=for-the-badge\&logo=google-cloud\&logoColor=white) ![Gitlab](https://img.shields.io/badge/GitLab-330F63?style=for-the-badge\&logo=gitlab\&logoColor=white) ![Jenkins](https://img.shields.io/badge/jenkins%20-%232C5263.svg?\&style=for-the-badge\&logo=jenkins\&logoColor=white) ![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge\&logo=ubuntu\&logoColor=white) ![Docker](https://img.shields.io/badge/docker%20-%230db7ed.svg?\&style=for-the-badge\&logo=docker\&logoColor=white) ![Kubernetes](https://img.shields.io/badge/kubernetes%20-%23326ce5.svg?\&style=for-the-badge\&logo=kubernetes\&logoColor=white) ![Vagrant](https://img.shields.io/badge/vagrant%20-%231563FF.svg?\&style=for-the-badge\&logo=vagrant\&logoColor=white) ![Ansible](https://img.shields.io/badge/ansible%20-%231A1918.svg?\&style=for-the-badge\&logo=ansible\&logoColor=white) ![Terraform](https://img.shields.io/badge/terraform%20-%235835CC.svg?\&style=for-the-badge\&logo=terraform\&logoColor=white)

\
[![](https://img.shields.io/badge/linkedin-%230077B5.svg?\&style=for-the-badge\&logo=linkedin\&logoColor=white) ](https://www.linkedin.com/in/joaocsjr/)  <br>

[![Joao castro GitHub Stats](https://github-readme-stats.vercel.app/api?username=joaocsjr\&show_icons=true)](https://github.com/joaocsjr)

📫 How to reach me: <jcastro@jcastro.net>

## Procedimento de instalação e configuração do ansible

### Maquina controller

```bash
yum install ansible
useradd devops
echo 'r3dh4t1!' | passwd --stdin devops

### criando chaves ssh para acesso sem senha 
ssh-keygen -N '' -f ~/.ssh/id_rsa

### pegando valor da chave 
cat homedouser/.ssh/id_rsa.pub

### Criando user para usar a chave criada
ansible all -m user -a "name=devops" -k 


### copiar como root
ansible all -m authorized_key -a "user=devops state=present key='ssh-rsa '" -k

### configurando o sudoers
ansible all -m lineinfile -a "dest=/etc/sudoers state=present line='devops ALL=(ALL) NOPASSWD: ALL'" -k 
```

**Como alternativa pode ser usado o comando:**

```bash
ssh-copy-id -i <file> devops@<server>
```

**testar a conexão com o host remoto**

```bash
ssh <servername>
```

**validando acesso via ansible**

```bash
ansible all -m ping
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.jcastro.net/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
