diff options
Diffstat (limited to 'ansible/roles/influx/tasks/main.yml')
-rw-r--r-- | ansible/roles/influx/tasks/main.yml | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/ansible/roles/influx/tasks/main.yml b/ansible/roles/influx/tasks/main.yml index fc3571c..8c5e754 100644 --- a/ansible/roles/influx/tasks/main.yml +++ b/ansible/roles/influx/tasks/main.yml @@ -1,23 +1,28 @@ - name: Install apt-packages - apt: - name: 'apt-transport-https' - state: present - -- name: Import InfluxDB GPG signing key - apt_key: url=https://repos.influxdata.com/influxdata-archive_compat.key state=present - -- name: Add InfluxDB repository - apt_repository: repo='deb https://repos.influxdata.com/{{ ansible_distribution | lower }} {{ ansible_distribution_release | lower }} stable' state=present + ansible.builtin.apt: + name: 'apt-transport-https' + state: present - name: Install InfluxDB packages - apt: name=influxdb state=present update_cache=yes + ansible.builtin.apt: + name: influxdb + state: present + update_cache: true - name: Start the InfluxDB service - service: name=influxdb state=started + ansible.builtin.service: + name: influxdb + state: started - name: Wait a few seconds for InfluxDB to start - pause: + ansible.builtin.pause: seconds: 5 +- name: Install influxdb-client + ansible.builtin.apt: + name: influxdb-client + state: present + update_cache: true + - name: Create database - command: /usr/bin/influx -execute 'CREATE DATABASE gondul' + ansible.builtin.command: /usr/bin/influx -execute 'CREATE DATABASE gondul'
\ No newline at end of file |