diff --git a/library/lightsail_region_facts.py b/library/lightsail_region_facts.py index 8da4c00..849acf2 100644 --- a/library/lightsail_region_facts.py +++ b/library/lightsail_region_facts.py @@ -93,7 +93,7 @@ def main(): response = client.get_regions( includeAvailabilityZones=False ) - module.exit_json(changed=False, results=response) + module.exit_json(changed=False, data=response) except (botocore.exceptions.ClientError, Exception) as e: module.fail_json(msg=str(e), exception=traceback.format_exc()) diff --git a/roles/cloud-lightsail/tasks/prompts.yml b/roles/cloud-lightsail/tasks/prompts.yml index be3c3e1..b1584f4 100644 --- a/roles/cloud-lightsail/tasks/prompts.yml +++ b/roles/cloud-lightsail/tasks/prompts.yml @@ -32,7 +32,7 @@ - name: Set facts about the regions set_fact: - lightsail_regions: "{{ _lightsail_regions.results.regions | sort(attribute='name') }}" + lightsail_regions: "{{ _lightsail_regions.data.regions | sort(attribute='name') }}" - name: Set the default region set_fact: