text: #!/usr/bin/env python
  DOCUMENTATION = '''
  ---
  module: hashivault_approle_role_get
  version_added: "3.8.0"
  short_description: Hashicorp Vault approle role get module
  description:
      - Module to get a approle role from Hashicorp Vault.
  options:
      url:
          description:
              - url for vault
          default: to environment variable VAULT_ADDR
      ca_cert:
          description:
              - "path to a PEM-encoded CA cert file to use to verify the Vault server TLS certificate"
          default: to environment variable VAULT_CACERT
      ca_path:
          description:
              - "path to a directory of PEM-encoded CA cert files to verify the Vault server TLS certificate : if ca_cert is specified, its value will take precedence"
          default: to environment variable VAULT_CAPATH
      client_cert:
          description:
              - "path to a PEM-encoded client certificate for TLS authentication to the Vault server"
          default: to environment variable VAULT_CLIENT_CERT
      client_key:
          description:
              - "path to an unencrypted PEM-encoded private key matching the client certificate"
          default: to environment variable VAULT_CLIENT_KEY
      verify:
          description:
              - "if set, do not verify presented TLS certificate before communicating with Vault server : setting this variable is not recommended except during testing"
          default: to environment variable VAULT_SKIP_VERIFY
      authtype:
          description:
              - "authentication type to use: token, userpass, github, ldap, approle"
          default: token
      token:
          description:
              - token for vault
          default: to environment variable VAULT_TOKEN
      username:
          description:
              - username to login to vault.
          default: to environment variable VAULT_USER
      password:
          description:
              - password to login to vault.
          default: to environment variable VAULT_PASSWORD
      name:
          description:
              - role name.
  '''
  EXAMPLES = '''
  ---
  - hosts: localhost
    tasks:
      - hashivault_approle_role_get:
          name: 'ashley'
        register: 'vault_approle_role_get'
      - debug: msg="Role is {{vault_approle_role_get.role}}"
  '''
  
  
  def main():
      argspec = hashivault_argspec()
      argspec['name'] = dict(required=True, type='str')
      module = hashivault_init(argspec)
      result = hashivault_approle_role_get(module.params)
      if result.get('failed'):
          module.fail_json(**result)
      else:
          module.exit_json(**result)
  
  
  from ansible.module_utils.basic import *
  from ansible.module_utils.hashivault import *
  
  
  @hashiwrapper
  def hashivault_approle_role_get(params):
      name = params.get('name')
      client = hashivault_auth_client(params)
      return {'role': client.get_role(name)}
  
  
  if __name__ == '__main__':
      main()
  