New in version 2.3.
parameter | required | default | choices | comments |
---|---|---|---|---|
cn | yes | Canonical name. Can not be changed as it is the unique identifier. aliases: name | ||
description | no | Description | ||
host | no | List of host names to assign. If an empty list is passed all hosts will be removed from the rule. If option is omitted hosts will not be checked or changed. | ||
hostcategory | no |
| Host category | |
hostgroup | no | List of hostgroup names to assign. If an empty list is passed all hostgroups will be removed. from the rule If option is omitted hostgroups will not be checked or changed. | ||
ipa_host | no | ipa.example.com | IP or hostname of IPA server | |
ipa_pass | yes | Password of administrative user | ||
ipa_port | no | 443 | Port of IPA server | |
ipa_prot | no | https |
| Protocol used by IPA server |
ipa_user | no | admin | Administrative account used on IPA server | |
service | no | List of service names to assign. If an empty list is passed all services will be removed from the rule. If option is omitted services will not be checked or changed. | ||
servicecategory | no |
| Service category | |
servicegroup | no | List of service group names to assign. If an empty list is passed all assigned service groups will be removed from the rule. If option is omitted service groups will not be checked or changed. | ||
sourcehost | no | List of source host names to assign. If an empty list if passed all assigned source hosts will be removed from the rule. If option is omitted source hosts will not be checked or changed. | ||
sourcehostcategory | no |
| Source host category | |
sourcehostgroup | no | List of source host group names to assign. If an empty list if passed all assigned source host groups will be removed from the rule. If option is omitted source host groups will not be checked or changed. | ||
state | no | present |
| State to ensure |
user | no | List of user names to assign. If an empty list if passed all assigned users will be removed from the rule. If option is omitted users will not be checked or changed. | ||
usercategory | no |
| User category | |
usergroup | no | List of user group names to assign. If an empty list if passed all assigned user groups will be removed from the rule. If option is omitted user groups will not be checked or changed. | ||
validate_certs | no | True | This only applies if ipa_prot is https.If set to no , the SSL certificates will not be validated.This should only set to no used on personally controlled sites using self-signed certificates. |
# Ensure rule to allow all users to access any host from any host - ipa_hbacrule: name: allow_all description: Allow all users to access any host from any host hostcategory: all servicecategory: all usercategory: all state: present ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret # Ensure rule with certain limitations - ipa_hbacrule: name: allow_all_developers_access_to_db description: Allow all developers to access any database from any host hostgroup: - db-server usergroup: - developers state: present ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret # Ensure rule is absent - ipa_hbacrule: name: rule_to_be_deleted state: absent ipa_host: ipa.example.com ipa_user: admin ipa_pass: topsecret
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
hbacrule | HBAC rule as returned by IPA API. | always | dict |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2017 Michael DeHaan
© 2017 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/ipa_hbacrule_module.html