Adds or removes a user from an InfluxDB database.
None.
parameter | required | default | choices | comments |
---|---|---|---|---|
admin | no | no |
|
Whether the user is considered as an admin (i.e has all privileges) or not. |
append_grants | no | no |
|
Append the privileges defined by grants to the existing ones for this user instead of overwriting existing ones. |
grants | no | InfluxDB privileges string in the format: db:grants_type grants_type should be one of ALL, WRITE, READ or NO |
||
name | yes | Name of the user to add, remove or modify. | ||
password | yes | Set the user's password. | ||
state | no | present |
|
Whether the user should exist. When absent , removes the user. |
# Removes user bob
- influxdb_user: name='bob' password='p@$$w0rd' state=absent
# Creates user bob if he does not exist
- influxdb_user: name='bob' password='p@$$w0rd' state=present
# Gives user bob the right to write in my_db, read in another_db
- influxdb_user: name='bob' password='p@$$w0rd' grants='my_db:WRITE,another_db:READ' state=present
# Removes the right for bob to read or write to my_db
- influxdb_user: name='bob' password='p@$$w0rd' grants='my_db:NO' state=present
# Gives all privileges to user bob on database my_db
- influxdb_user: name='bob' password='p@$$w0rd' grants='my_db:ALL' state=present