community.general.influxdb_user – Manage InfluxDB users¶
Note
This plugin is part of the community.general collection (version 1.3.6).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.influxdb_user
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
influxdb >= 0.9
Parameters¶
Examples¶
- 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
Authors¶
Vitaliy Zhhuta (@zhhuta)