mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix influxdb_database.present state
make use of influxdb.create_db instead of influxdb.db_create which does not exist
This commit is contained in:
parent
a01fade604
commit
c6b075d6f4
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ def present(name, **client_args):
|
|||
ret['comment'] = 'Database {0} is absent and will be created'\
|
||||
.format(name)
|
||||
return ret
|
||||
if __salt__['influxdb.db_create'](name, **client_args):
|
||||
if __salt__['influxdb.create_db'](name, **client_args):
|
||||
ret['comment'] = 'Database {0} has been created'.format(name)
|
||||
ret['changes'][name] = 'Present'
|
||||
return ret
|
||||
|
@ -64,7 +64,7 @@ def absent(name, **client_args):
|
|||
ret['comment'] = 'Database {0} is present and needs to be removed'\
|
||||
.format(name)
|
||||
return ret
|
||||
if __salt__['influxdb.db_remove'](name, **client_args):
|
||||
if __salt__['influxdb.drop_db'](name, **client_args):
|
||||
ret['comment'] = 'Database {0} has been removed'.format(name)
|
||||
ret['changes'][name] = 'Absent'
|
||||
return ret
|
||||
|
|
Loading…
Add table
Reference in a new issue