Skip to content

Commit

Permalink
Fix error creating EC2 runner instances (#1012)
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Hajas <mhajas@redhat.com>
Co-authored-by: Ryan Emerson <remerson@redhat.com>
  • Loading branch information
mhajas and ryanemerson authored Oct 14, 2024
1 parent a5a8daf commit c12cae5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/actions/ec2-create-instances/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ runs:
name: Install the required Ansible AWS collections.
shell: bash
run: |
python3 -m venv .venv
source .venv/bin/activate
./aws_ec2.sh requirements
pipx inject ansible-core boto3 botocore
working-directory: ansible
Expand Down
4 changes: 3 additions & 1 deletion .github/actions/ec2-delete-instances/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ runs:
steps:
- id: delete-load-runners
shell: bash
run: ./aws_ec2.sh delete ${{ inputs.region }}
run: |
source .venv/bin/activate
./aws_ec2.sh delete ${{ inputs.region }}
working-directory: ansible
2 changes: 1 addition & 1 deletion ansible/aws_ec2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ REGION=$2
case $OPERATION in
requirements)
ansible-galaxy collection install -r requirements.yml
pip3 install --user boto3 botocore
pip3 install boto3 botocore
;;
create|delete|start|stop)
if [ -f "env.yml" ]; then ANSIBLE_CUSTOM_VARS_ARG="-e @env.yml"; fi
Expand Down

0 comments on commit c12cae5

Please sign in to comment.