fix: minor change with ansible no_log
This commit is contained in:
parent
85c60f40eb
commit
16f58ca642
3 changed files with 10 additions and 6 deletions
|
@ -14,6 +14,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/)
|
||||||
|
|
||||||
- test: replace kitchen to molecule
|
- test: replace kitchen to molecule
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- fix no_log
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- remove support for debian 9
|
- remove support for debian 9
|
||||||
|
|
|
@ -59,9 +59,9 @@ def main():
|
||||||
fields = {
|
fields = {
|
||||||
'user': { 'type': 'str', 'required': True },
|
'user': { 'type': 'str', 'required': True },
|
||||||
'database': { 'type': 'str', 'required': True },
|
'database': { 'type': 'str', 'required': True },
|
||||||
'privilege': { 'type': 'str', 'required': True, 'choices': ['ALL', 'WRITE', 'READ'] },
|
'privilege': { 'type': 'str', 'required': True, 'choices': ['ALL', 'WRITE', 'READ'] },
|
||||||
'api_user': { 'type': 'str' },
|
'api_user': { 'type': 'str' },
|
||||||
'api_password': { 'type': 'str' },
|
'api_password': { 'type': 'str', 'no_log': True},
|
||||||
'api_host': { 'type': 'str', 'default': '127.0.0.1' },
|
'api_host': { 'type': 'str', 'default': '127.0.0.1' },
|
||||||
'api_port': { 'type': 'int', 'default': 8086 },
|
'api_port': { 'type': 'int', 'default': 8086 },
|
||||||
'state': { 'type': 'str', 'default': 'present', 'choices': ['present', 'absent'] }
|
'state': { 'type': 'str', 'default': 'present', 'choices': ['present', 'absent'] }
|
||||||
|
|
|
@ -30,8 +30,9 @@
|
||||||
username: '{{ influxdb_api_user }}'
|
username: '{{ influxdb_api_user }}'
|
||||||
password: '{{ influxdb_api_password }}'
|
password: '{{ influxdb_api_password }}'
|
||||||
loop: '{{ influxdb_users }}'
|
loop: '{{ influxdb_users }}'
|
||||||
|
loop_control:
|
||||||
|
label: '{{ item.name }}'
|
||||||
when: item.state is not defined or item.state != 'absent'
|
when: item.state is not defined or item.state != 'absent'
|
||||||
no_log: true
|
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: delete users
|
- name: delete users
|
||||||
|
@ -41,8 +42,9 @@
|
||||||
password: '{{ influxdb_api_password }}'
|
password: '{{ influxdb_api_password }}'
|
||||||
state: absent
|
state: absent
|
||||||
loop: '{{ influxdb_users }}'
|
loop: '{{ influxdb_users }}'
|
||||||
|
loop_control:
|
||||||
|
label: '{{ item.name }}'
|
||||||
when: item.state is defined and item.state == 'absent'
|
when: item.state is defined and item.state == 'absent'
|
||||||
no_log: true
|
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: create databases
|
- name: create databases
|
||||||
|
@ -51,7 +53,6 @@
|
||||||
username: '{{ influxdb_api_user }}'
|
username: '{{ influxdb_api_user }}'
|
||||||
password: '{{ influxdb_api_password }}'
|
password: '{{ influxdb_api_password }}'
|
||||||
loop: '{{ influxdb_databases }}'
|
loop: '{{ influxdb_databases }}'
|
||||||
no_log: true
|
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
||||||
- name: create privileges
|
- name: create privileges
|
||||||
|
@ -64,5 +65,4 @@
|
||||||
api_port: '{{ influxdb_api_port }}'
|
api_port: '{{ influxdb_api_port }}'
|
||||||
state: '{{ item.state|default("present") }}'
|
state: '{{ item.state|default("present") }}'
|
||||||
loop: '{{ influxdb_privileges }}'
|
loop: '{{ influxdb_privileges }}'
|
||||||
no_log: true
|
|
||||||
tags: influxdb
|
tags: influxdb
|
||||||
|
|
Loading…
Reference in a new issue