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