mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-24 13:50:22 -07:00
efs_facts: Documentation update (#46826)
* Update pydoc * Update module documentation and example * Add aliases for name as creation_token Fixes: #28738 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
150e9db568
commit
871dd77f2b
1 changed files with 28 additions and 29 deletions
|
@ -16,7 +16,7 @@ DOCUMENTATION = '''
|
|||
module: efs_facts
|
||||
short_description: Get information about Amazon EFS file systems
|
||||
description:
|
||||
- Module searches Amazon EFS file systems
|
||||
- This module can be used to search Amazon EFS file systems.
|
||||
version_added: "2.2"
|
||||
requirements: [ boto3 ]
|
||||
author:
|
||||
|
@ -25,35 +25,33 @@ options:
|
|||
name:
|
||||
description:
|
||||
- Creation Token of Amazon EFS file system.
|
||||
aliases: [ creation_token ]
|
||||
id:
|
||||
description:
|
||||
- ID of Amazon EFS.
|
||||
tags:
|
||||
description:
|
||||
- List of tags of Amazon EFS. Should be defined as dictionary
|
||||
- List of tags of Amazon EFS. Should be defined as dictionary.
|
||||
targets:
|
||||
description:
|
||||
- list of targets on which to filter the returned results
|
||||
- result must match all of the specified targets, each of which can be
|
||||
a security group ID, a subnet ID or an IP address
|
||||
- List of targets on which to filter the returned results.
|
||||
- Result must match all of the specified targets, each of which can be a security group ID, a subnet ID or an IP address.
|
||||
extends_documentation_fragment:
|
||||
- aws
|
||||
- ec2
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# find all existing efs
|
||||
- efs_facts:
|
||||
- name: Find all existing efs
|
||||
efs_facts:
|
||||
register: result
|
||||
|
||||
- efs_facts:
|
||||
name: myTestNameTag
|
||||
|
||||
- efs_facts:
|
||||
- name: Find efs using id
|
||||
efs_facts:
|
||||
id: fs-1234abcd
|
||||
|
||||
# Searching all EFS instances with tag Name = 'myTestNameTag', in subnet 'subnet-1a2b3c4d' and with security group 'sg-4d3c2b1a'
|
||||
- efs_facts:
|
||||
- name: Searching all EFS instances with tag Name = 'myTestNameTag', in subnet 'subnet-1a2b3c4d' and with security group 'sg-4d3c2b1a'
|
||||
efs_facts:
|
||||
tags:
|
||||
name: myTestNameTag
|
||||
targets:
|
||||
|
@ -174,6 +172,7 @@ except ImportError:
|
|||
from ansible.module_utils.aws.core import AnsibleAWSModule
|
||||
from ansible.module_utils.ec2 import boto3_conn, get_aws_connection_info, ec2_argument_spec, AWSRetry
|
||||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict, boto3_tag_list_to_ansible_dict
|
||||
from ansible.module_utils._text import to_native
|
||||
|
||||
|
||||
class EFSConnection(object):
|
||||
|
@ -189,7 +188,7 @@ class EFSConnection(object):
|
|||
**aws_connect_params)
|
||||
self.module = module
|
||||
except Exception as e:
|
||||
module.fail_json(msg="Failed to connect to AWS: %s" % str(e))
|
||||
module.fail_json(msg="Failed to connect to AWS: %s" % to_native(e))
|
||||
|
||||
self.region = region
|
||||
|
||||
|
@ -352,7 +351,7 @@ def main():
|
|||
argument_spec = ec2_argument_spec()
|
||||
argument_spec.update(dict(
|
||||
id=dict(),
|
||||
name=dict(),
|
||||
name=dict(aliases=['creation_token']),
|
||||
tags=dict(type="dict", default={}),
|
||||
targets=dict(type="list", default=[])
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue