community / community.zabbix / 1.8.0 / module / zabbix_user_directory Create/update/delete Zabbix user directories Authors: Evgeny Yurchenko (@BGmot)community.zabbix.zabbix_user_directory (1.8.0) — module
Install with ansible-galaxy collection install community.zabbix:==1.8.0
collections: - name: community.zabbix version: 1.8.0
This module allows you to create, modify and delete Zabbix user directories.
--- - name: Create new user directory or update existing info community.zabbix.zabbix_user_directory: server_url: http://monitor.example.com login_user: username login_password: password state: present name: TestUserDirectory host: 'test.com' port: 389 base_dn: 'ou=Users,dc=example,dc=org' search_attribute: 'uid' bind_dn: 'cn=ldap_search,dc=example,dc=org' description: 'Test user directory' search_filter: '(%{attr}=test_user)' start_tls: 0
host: description: - LDAP server host name, IP or URI. URI should contain schema, host and port (optional). required: false type: str name: description: - Unique name of the user directory. required: true type: str port: description: - LDAP server port. required: false type: int state: choices: - present - absent default: present description: - State of the user directory. - On C(present), it will create if user directory does not exist or update it if the associated data is different. - On C(absent) will remove the user directory if it exists. type: str base_dn: description: - LDAP base distinguished name string. required: false type: str bind_dn: description: - LDAP bind distinguished name string. Can be empty for anonymous binding. required: false type: str timeout: default: 10 description: - The timeout of API request (seconds). type: int start_tls: choices: - 0 - 1 default: 0 description: - LDAP startTLS option. It cannot be used with ldaps:// protocol hosts. required: false type: int login_user: description: - Zabbix user name. - If not set the environment variable C(ZABBIX_USERNAME) will be used. required: true type: str server_url: aliases: - url description: - URL of Zabbix server, with protocol (http or https). C(url) is an alias for C(server_url). - If not set the environment variable C(ZABBIX_SERVER) will be used. required: true type: str description: description: - User directory description. required: false type: str bind_password: description: - LDAP bind password. Can be empty for anonymous binding. - Available only for I(present) C(state). required: false type: str search_filter: default: (%{attr}=%{user}) description: - LDAP custom filter string when authenticating user in LDAP. required: false type: str login_password: description: - Zabbix user password. - If not set the environment variable C(ZABBIX_PASSWORD) will be used. required: true type: str validate_certs: default: true description: - If set to False, SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - If not set the environment variable C(ZABBIX_VALIDATE_CERTS) will be used. type: bool http_login_user: description: - Basic Auth login type: str search_attribute: description: - LDAP attribute name to identify user by username in Zabbix database. required: false type: str http_login_password: description: - Basic Auth password type: str