From 357dafffa4bfadcde3a816ed99fbccd8e755b69c Mon Sep 17 00:00:00 2001 From: Alexander Todorov Date: Fri, 26 Apr 2019 19:58:28 +0300 Subject: [PATCH] Update ali_instance_facts examples in documentation (#55760) (#55803) --- .../modules/cloud/alicloud/ali_instance_facts.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/ansible/modules/cloud/alicloud/ali_instance_facts.py b/lib/ansible/modules/cloud/alicloud/ali_instance_facts.py index 8636622c515..591ff887a61 100644 --- a/lib/ansible/modules/cloud/alicloud/ali_instance_facts.py +++ b/lib/ansible/modules/cloud/alicloud/ali_instance_facts.py @@ -72,15 +72,26 @@ EXAMPLES = ''' tasks: - name: Find all instances in the specified region ali_instance_facts: + alicloud_access_key: '{{ alicloud_access_key }}' + alicloud_secret_key: '{{ alicloud_secret_key }}' + alicloud_region: '{{ alicloud_region }}' register: all_instances + - name: Find all instances based on the specified ids ali_instance_facts: + alicloud_access_key: '{{ alicloud_access_key }}' + alicloud_secret_key: '{{ alicloud_secret_key }}' + alicloud_region: '{{ alicloud_region }}' instance_ids: - "i-35b333d9" - "i-ddav43kd" register: instances_by_ids + - name: Find all instances based on the specified names/name-prefixes ali_instance_facts: + alicloud_access_key: '{{ alicloud_access_key }}' + alicloud_secret_key: '{{ alicloud_secret_key }}' + alicloud_region: '{{ alicloud_region }}' instance_names: - "ecs_instance-1" - "ecs_instance_2"