Skip to content

Update Flaskex Env

Update Flaskex Env #7

Workflow file for this run

name: Ansible-Deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }}
ANSIBLE_HOST_KEY_CHECKING: False
FLASKEX_REPO: "https://github.com/anfederico/flaskex.git"
FLASKEX_BRANCH: "master"
steps:
- uses: actions/checkout@v3
- name: Install Python Packages
run: |
. /opt/pipx/venvs/ansible-core/bin/activate
/opt/pipx/venvs/ansible-core/bin/python -m pip install boto3 botocore
- name: Import SSH Private Key
run: |
echo "${{ secrets.ANSIBLE_SSH_KEY }}" > ansible-key
chmod 400 ansible-key
- name: Execute Ansible PLaybook
run: ansible-playbook -i aws_ec2.yml --private-key=ansible-key main.yml -u centos -b