main.yml 1013 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
---
- include: install.yml
  tags: [influxdb, install]

- include: configure.yml
  tags: [influxdb, configure]

- include: cluster.yml
  tags: [influxdb, cluster]
10
  when: influxdb_cluster_servers and influxdb_start_service
11

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
- name: Start the InfluxDB service
  service:
    name: influxdb
    state: restarted
    enabled: yes
  register: influxdb_started
  when: influxdb_start_service

- name: Pause to ensure InfluxDB service is up
  pause:
    seconds: 3
  when: influxdb_started.changed and influxdb_start_service
  
- name: Collect service status
  command: service influxdb status
  register: influxdb_service_status
  when: influxdb_start_service
  ignore_errors: yes

- name: Assert status of InfluxDB service
  assert:
    that:
      - "influxdb_service_status.rc == 0"
  when: influxdb_start_service
  
37
38
- include: demo.yml
  tags: [influxdb, demo]
39
  when: influxdb_load_sample_data and influxdb_http_auth_enabled == "false" and influxdb_start_service
40
41
42

- include: verify.yml
  tags: [influxdb, verify]