cloudera.services.ranger_policy_info module – Retrieve policy details from Apache Ranger
Note
This module is part of the cloudera.services collection (version 1.0.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install git+https://github.com/cloudera-labs/cloudera.services.git.
To use it in a playbook, specify: cloudera.services.ranger_policy_info.
New in cloudera.services 1.1.0
Synopsis
Retrieve details of a specific policy by ID or name.
If no identifier is provided, retrieves all services.
The module supports
check_mode.
Parameters
Parameter |
Comments |
|---|---|
The path to a client certificate for authenticating to the API endpoint. |
|
The path to a client key for authenticating to the API endpoint. |
|
A flag to enable debug logging of the module’s execution. Choices:
|
|
A flag to force a refresh of the API request, ignoring any cached results. Choices:
|
|
A flag to force basic authentication for API requests. Choices:
|
|
The User-Agent string to send with API requests. Default: |
|
Name of the Ranger policy. This parameter is mutually exclusive with |
|
The number of items to return per page in a paginated API response. Default: |
|
ID of the Ranger policy to retrieve. This parameter is mutually exclusive with |
|
Name of the Ranger service associated with the policy. When provided with When provided alone, retrieves all policies for the service. |
|
The timeout in seconds for any API requests. Default: |
|
The base URL of the API endpoint, including the port if necessary. |
|
The password for authenticating to the API endpoint. |
|
The username for authenticating to the API endpoint. |
|
A flag to enable or disable GSSAPI authentication for API requests. Choices:
|
|
A flag to enable or disable the use of a proxy for API requests. Choices:
|
|
A flag to enable or disable SSL certificate validation for API requests. Choices:
|
Examples
# NOTE: Examples do not include connection and authentication fields
- name: Retrieve policy by ID
cloudera.services.ranger_policy_info:
policy_id: 67
- name: Retrieve policy by name and service
cloudera.services.ranger_policy_info:
name: "all - global"
service: "hive"
- name: Retrieve all policies in a specific service
cloudera.services.ranger_policy_info:
service: "hive"
- name: Retrieve all policies
cloudera.services.ranger_policy_info:
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
List of policies matching the given criteria, or all policies if no filter is applied. Returned: always |
|
List of additional resource definitions. Returned: always |
|
Whether the specified values are excluded rather than included. Returned: always |
|
Whether the resource match is applied recursively. Returned: always |
|
List of resource values matched by this resource definition. Returned: always |
|
List of allow exception policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
List of policy conditions. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Epoch timestamp when the policy was created. Returned: always |
|
Username of the policy creator. Returned: always |
|
List of data mask policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
The data masking configuration applied by this policy item. Returned: always |
|
The condition expression controlling when the mask applies. Returned: always |
|
The type of data masking to apply. Returned: always |
|
The expression used to compute the masked value. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
List of deny exception policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
List of deny policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
Optional description of the policy. Returned: always |
|
Globally unique identifier for the policy. Returned: always |
|
Unique numeric ID of the policy. Returned: always |
|
Whether auditing is enabled for the policy. Returned: always |
|
Whether the policy denies all accesses not explicitly allowed. Returned: always |
|
Whether the policy is currently enabled. Returned: always |
|
Name of the policy. Returned: always |
|
Dictionary of additional policy options. Returned: always |
|
List of allow policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
List of policy labels. Returned: always |
|
Priority value for the policy. Returned: always |
|
Numeric identifier for the type of policy. Returned: always |
|
Signature hash of the resources in the policy. Returned: always |
|
Dictionary of resources the policy applies to. Returned: always |
|
Whether the specified values are excluded rather than included. Returned: always |
|
Whether the resource match is applied recursively. Returned: always |
|
List of resource values matched by this resource definition. Returned: always |
|
List of row filter policy items. Returned: always |
|
List of access types and whether each is allowed. Returned: always |
|
Whether this access type is allowed. Returned: always |
|
The access type (e.g. Returned: always |
|
List of custom conditions for the policy item. Returned: always |
|
The type of the condition. Returned: always |
|
The values associated with the condition. Returned: always |
|
Whether users/groups of this policy item are allowed to update the policy. Returned: always |
|
List of groups the policy item applies to. Returned: always |
|
List of roles the policy item applies to. Returned: always |
|
The row filter configuration applied by this policy item. Returned: always |
|
The filter expression applied to rows. Returned: always |
|
List of users the policy item applies to. Returned: always |
|
Name of the service this policy applies to. Returned: always |
|
Type of the service (e.g., hive, hdfs) this policy applies to. Returned: always |
|
Epoch timestamp when the policy was last updated. Returned: always |
|
Username of the last person who updated the policy. Returned: always |
|
List of validity schedules attached to the policy. Returned: always |
|
The end time of the validity schedule. Returned: always |
|
List of recurrence definitions for the schedule. Returned: always |
|
The recurrence interval definition. Returned: always |
|
The recurrence schedule definition. Returned: always |
|
The start time of the validity schedule. Returned: always |
|
The time zone the schedule times are expressed in. Returned: always |
|
Version number of the policy. Returned: always |
|
Name of the security zone this policy belongs to. Returned: always |