redhatgov.workshops icon indicating copy to clipboard operation
redhatgov.workshops copied to clipboard

RHEL_AWS: " enable auto-selection of RHEL and Windows AMIs" breaks RHEL 8 workshop deployment

Open benblasco opened this issue 2 years ago • 0 comments

The change at the following PR causes deployment of the RHEL_AWS workshop to break when an account does not have Cloud Access enabled:

https://github.com/RedHatGov/redhatgov.workshops/pull/178

This is because the file https://github.com/RedHatGov/redhatgov.workshops/tree/master/ansible_tower_aws/roles/aws.create/tasks/main.yml searches for AMIs that match --filters "Name=name,Values={{ rhel_ver }}*x86_64*Access2*". The word "Access" in that filter means that is only looking for Cloud Access images, and none will be available unless the user has enabled cloud access at console.redhat.com ahead of provisioning the workshop.

Steps to reproduce

  • Attempt to deploy RHEL_AWS workshop with group_vars/all.yml set to cloud_access: false or
  • Attempt to deploy RHEL_AWS workshop with group_vars/all.yml set to cloud_access: true without having enabled Cloud Access beforehand. This method is probably more of a user error as they should check to see Cloud Access is configured before attempting the deployment.

Proposed solution

  • Increase the smarts in the AMI search based on whether cloud_access is set to true or false or
  • Change the pre-reqs for deploying the workshop to make it mandatory to have cloud access enabled AND remove the option to deploy without cloud access.

benblasco avatar May 02 '22 12:05 benblasco