Skip to content

Install Python Modules #4

Install Python Modules

Install Python Modules #4

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
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 Key
run: echo "${{ secrets.ANSIBLE_SSH_KEY }}" > ansible_key
- name: Execute Ansible PLaybook
run: ansible-playbook -i aws_ec2.yml --private-key=ansible-key main.yml -u centos -b