-
Notifications
You must be signed in to change notification settings - Fork 0
/
playbook.yaml
31 lines (31 loc) · 1.18 KB
/
playbook.yaml
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
- name: Configuração do Servidor
hosts: localhost
become: true
tasks:
- name: Atualizar pacotes
apt:
update_cache: yes
upgrade: yes
- name: Instalar pacotes necessários
apt:
name: "{{ item }}"
state: present
loop:
- python3-pip
- python3-dev
- python3-venv
- libssl-dev
- libffi-dev
- build-essential
- software-properties-common
- name: Adicionar repositório do Docker
apt_repository:
repo: "deb [arch=amd64] https://download.docker.com/linux/ubuntu {{ ansible_distribution_release }} stable"
state: present
- name: Instala Docker CE
apt:
name: docker-ce
state: present
- name: Instalar Terraform
become_user: "{{ ansible_user }}"
command: "curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg && echo 'deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main' | tee /etc/apt/sources.list.d/hashicorp.list > /dev/null && apt-get update && apt-get install terraform -y"