alicante-infra/roles/common/tasks/main.yml

46 lines
930 B
YAML

---
- name: Actualizar Sistema
apt:
update_cache: yes
upgrade: dist
environment:
DEBIAN_FRONTEND: noninteractive
- name: Instalar Dependencias Base y Python
apt:
name:
- curl
- git
- htop
- ufw
- ca-certificates
- gnupg
- python3-pip
- python3-requests # <--- ESTA ES LA CLAVE
- python3-docker # <--- Y ESTA TAMBIÉN
state: present
- name: Instalar Docker (Oficial)
shell: |
if [ ! -f /usr/bin/docker ]; then
curl -fsSL https://get.docker.com | sh
fi
args:
creates: /usr/bin/docker
- name: Configurar Firewall UFW
shell: |
ufw allow 22/tcp
ufw allow 10000/tcp
ufw allow 9000/tcp
ufw allow 9443/tcp
ufw allow 8080/tcp
ufw allow 3000/tcp
ufw allow 8081/tcp
ufw allow 6875/tcp
ufw allow 3001/tcp
ufw allow 7575/tcp
ufw allow 5001/tcp
ufw --force enable
ignore_errors: yes