Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 2.04 KB

module_influxdb_user.md

File metadata and controls

44 lines (32 loc) · 2.04 KB

influxdb_user - Adds or removes a user from an InfluxDB database.

Synopsis

Adds or removes a user from an InfluxDB database.

Requirements (on host that executes module)

None.

Options

parameter required default choices comments
admin no no
  • yes
  • no
Whether the user is considered as an admin (i.e has all privileges) or not.
append_grants no no
  • yes
  • 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
  • present
  • absent
Whether the user should exist. When absent, removes the user.

Examples

# 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