This repository has been archived on 2020-07-02. You can view files and clone it, but cannot push or open issues or pull requests.
galaxy-influx/tasks/admin.yml
2019-07-10 17:11:36 +02:00

33 lines
No EOL
693 B
YAML

---
- name: Push influxdb config, with auth disable, for admin setup
template:
src: influxdb.admin.conf.j2
dest: /etc/influxdb/influxdb.conf
notify: reload influxdb
register: conf
- name: Reload influxdb, with auth disable, for admin setup
service:
name: influxdb
state: restarted
when: conf.changed
- name: Ensure Influx is up
uri:
url: http://localhost:{{ influx_port }}
status: 204
retries: 3
delay: 2
ignore_errors: true
- name: Ensure admin user
influxdb_user:
user_name: "{{ admin_name }}"
user_password: "{{ admin_pass }}"
admin: yes
- name: Leave a trace of admin setup
file:
path: /etc/influxdb/admin
state: touch