chore: use FQCN for module name
This commit is contained in:
parent
16f58ca642
commit
58d940562a
4 changed files with 16 additions and 16 deletions
|
@ -13,6 +13,7 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- test: replace kitchen to molecule
|
- test: replace kitchen to molecule
|
||||||
|
- chore: use FQCN for module name
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: restart influxdb
|
- name: restart influxdb
|
||||||
systemd:
|
ansible.builtin.service:
|
||||||
name: influxdb
|
name: influxdb
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: copy config file
|
- name: copy config file
|
||||||
template:
|
ansible.builtin.template:
|
||||||
src: influxdb.conf.j2
|
src: influxdb.conf.j2
|
||||||
dest: /etc/influxdb/influxdb.conf
|
dest: /etc/influxdb/influxdb.conf
|
||||||
owner: root
|
owner: root
|
||||||
|
@ -10,20 +10,20 @@
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: start and enable service
|
- name: start and enable service
|
||||||
systemd:
|
ansible.builtin.service:
|
||||||
name: influxdb
|
name: influxdb
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: wait http api is up
|
- name: wait http api is up
|
||||||
wait_for:
|
ansible.builtin.wait_for:
|
||||||
port: 8086
|
port: 8086
|
||||||
timeout: 10
|
timeout: 10
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: create users
|
- name: create users
|
||||||
influxdb_user:
|
community.general.influxdb_user:
|
||||||
user_name: '{{ item.name }}'
|
user_name: '{{ item.name }}'
|
||||||
user_password: '{{ item.password }}'
|
user_password: '{{ item.password }}'
|
||||||
admin: '{{ item.admin|default(false) }}'
|
admin: '{{ item.admin|default(false) }}'
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: delete users
|
- name: delete users
|
||||||
influxdb_user:
|
community.general.influxdb_user:
|
||||||
user_name: '{{ item.name }}'
|
user_name: '{{ item.name }}'
|
||||||
username: '{{ influxdb_api_user }}'
|
username: '{{ influxdb_api_user }}'
|
||||||
password: '{{ influxdb_api_password }}'
|
password: '{{ influxdb_api_password }}'
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: create databases
|
- name: create databases
|
||||||
influxdb_database:
|
community.general.influxdb_database:
|
||||||
database_name: '{{ item }}'
|
database_name: '{{ item }}'
|
||||||
username: '{{ influxdb_api_user }}'
|
username: '{{ influxdb_api_user }}'
|
||||||
password: '{{ influxdb_api_password }}'
|
password: '{{ influxdb_api_password }}'
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: install depencies packages
|
- name: install depencies packages
|
||||||
apt:
|
ansible.builtin.package:
|
||||||
name: '{{ packages }}'
|
name:
|
||||||
vars:
|
|
||||||
packages:
|
|
||||||
- apt-transport-https
|
- apt-transport-https
|
||||||
- collectd-core
|
- collectd-core
|
||||||
- python3-pip
|
- python3-pip
|
||||||
|
@ -13,7 +11,7 @@
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: add key for influxdb repository
|
- name: add key for influxdb repository
|
||||||
apt_key:
|
ansible.builtin.apt_key:
|
||||||
url: https://repos.influxdata.com/influxdb.key
|
url: https://repos.influxdata.com/influxdb.key
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
|
@ -21,20 +19,21 @@
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: add influxdb repository
|
- name: add influxdb repository
|
||||||
apt_repository:
|
ansible.builtin.apt_repository:
|
||||||
repo: 'deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable'
|
repo: 'deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable'
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: install influxdb package
|
- name: install influxdb package
|
||||||
apt:
|
ansible.builtin.package:
|
||||||
name: influxdb
|
name:
|
||||||
|
- influxdb
|
||||||
register: result
|
register: result
|
||||||
until: result is succeeded
|
until: result is succeeded
|
||||||
retries: 2
|
retries: 2
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: install python-influxdb
|
- name: install python-influxdb
|
||||||
pip:
|
ansible.builtin.pip:
|
||||||
name: influxdb
|
name: influxdb
|
||||||
executable: /usr/bin/pip3
|
executable: /usr/bin/pip3
|
||||||
register: result
|
register: result
|
||||||
|
|
Loading…
Reference in a new issue