Instalar a PostgreSQL en la máquina de la BD #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Instalar a PostgreSQL en la máquina de la BD | |
on: | |
workflow_dispatch: | |
jobs: | |
ansible: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v3 | |
# - name: Instalar az CLI | |
# run: | | |
# curl -sL https://aka.ms/InstallAzureCLIDeb| sudo bash | |
- name: Instalar Ansible | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ansible | |
- name: Verify Ansible Installation | |
run: ansible --version | |
- name: Instalar ssh | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y sshpass | |
- name: Crear archivo con la contraseña de Ansible | |
run: | | |
echo "$VAULT_PASSWORD" > vault_password.txt | |
env: | |
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }} | |
working-directory: ansible | |
- name: Ejecutar playbook para instalar PostgreSQL | |
run: | | |
ansible-playbook -i inventory.ini postgresql.yml --vault-password-file vault_password.txt | |
working-directory: ansible |