community / community.general / 1.3.14 / module / influxdb_user Manage InfluxDB users Authors: Vitaliy Zhhuta (@zhhuta)community.general.influxdb_user (1.3.14) — module
Install with ansible-galaxy collection install community.general:==1.3.14
collections: - name: community.general version: 1.3.14
Manage InfluxDB users.
- name: Create a user on localhost using default login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t
- name: Create a user on localhost using custom login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}"
- name: Create an admin user on a remote host using custom login credentials community.general.influxdb_user: user_name: john user_password: s3cr3t admin: yes hostname: "{{ influxdb_hostname }}" login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}"
- name: Create a user on localhost with privileges community.general.influxdb_user: user_name: john user_password: s3cr3t login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" grants: - database: 'collectd' privilege: 'WRITE' - database: 'graphite' privilege: 'READ'
- name: Destroy a user using custom login credentials community.general.influxdb_user: user_name: john login_username: "{{ influxdb_username }}" login_password: "{{ influxdb_password }}" state: absent
ssl: default: false description: - Use https instead of http to connect to InfluxDB server. type: bool path: description: - The path on which InfluxDB server is accessible - Only available when using python-influxdb >= 5.1.0 type: str version_added: 0.2.0 version_added_collection: community.general port: default: 8086 description: - The port on which InfluxDB server is listening type: int admin: default: false description: - Whether the user should be in the admin role or not. - Since version 2.8, the role will also be updated. type: bool state: choices: - absent - present default: present description: - State of the user. type: str grants: description: - Privileges to grant to this user. - Takes a list of dicts containing the "database" and "privilege" keys. - If this argument is not provided, the current grants will be left alone. - If an empty list is provided, all grants for the user will be removed. elements: dict type: list proxies: description: - HTTP(S) proxy to use for Requests to connect to InfluxDB server. type: dict retries: default: 3 description: - Number of retries client will try before aborting. - C(0) indicates try until success. - Only available when using python-influxdb >= 4.1.0 type: int timeout: description: - Number of seconds Requests will wait for client to establish a connection. type: int use_udp: default: false description: - Use UDP to connect to InfluxDB server. type: bool hostname: default: localhost description: - The hostname or IP address on which InfluxDB server is listening. - Since Ansible 2.5, defaulted to localhost. type: str password: aliases: - login_password default: root description: - Password that will be used to authenticate against InfluxDB server. - Alias C(login_password) added in Ansible 2.5. type: str udp_port: default: 4444 description: - UDP port to connect to InfluxDB server. type: int username: aliases: - login_username default: root description: - Username that will be used to authenticate against InfluxDB server. - Alias C(login_username) added in Ansible 2.5. type: str user_name: description: - Name of the user. required: true type: str user_password: description: - Password to be set for the user. required: false type: str validate_certs: default: true description: - If set to C(no), the SSL certificates will not be validated. - This should only set to C(no) used on personally controlled sites using self-signed certificates. type: bool