ansible / product-demos

GNU General Public License v3.0
194 stars 194 forks source link

⚠ add custom-sized VM to cloud demo #96

Closed l3acon closed 1 year ago

l3acon commented 1 year ago

@jce-redhat this is what I had, it's pretty bare-bones so totally open to suggestions.

willtome commented 1 year ago

LGTM

jce-redhat commented 1 year ago

it might be simpler to just edit the existing cloud/setup.yml and add a new survey question to the Cloud / AWS / Create VM job template. the blueprint already specifies the aws_instance_size variable for each blueprint, so the new survey question would just override it.

jce-redhat commented 1 year ago

i tested this addition to the survey for "Cloud / AWS / Create VM" and it works. using require: false is key so that if no value is provided for the instance type, it will default to whatever is in the VM blueprint.

        - question_name: AWS Instance Type (defaults to blueprint value)
          type: text
          variable: create_vm_aws_instance_size
          required: false

EDIT: corrected variable name

l3acon commented 1 year ago

That is obviously simpler and better, opened new PR https://github.com/ansible/product-demos/pull/97