mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
parent
7a46fe6693
commit
357dafffa4
1 changed files with 11 additions and 0 deletions
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue