@ -125,7 +125,7 @@ def influxdb_argument_spec():
port = dict ( default = 8086 , type = ' int ' ) ,
port = dict ( default = 8086 , type = ' int ' ) ,
username = dict ( default = ' root ' , type = ' str ' ) ,
username = dict ( default = ' root ' , type = ' str ' ) ,
password = dict ( default = ' root ' , type = ' str ' , no_log = True ) ,
password = dict ( default = ' root ' , type = ' str ' , no_log = True ) ,
database_name = dict ( default= Non e, type = ' str ' )
database_name = dict ( required= Tru e, type = ' str ' )
)
)
@ -195,7 +195,7 @@ def alter_retention_policy(module, client, retention_policy):
elif duration_lookup . group ( 2 ) == ' w ' :
elif duration_lookup . group ( 2 ) == ' w ' :
influxdb_duration_format = ' %s h0m0s ' % ( int ( duration_lookup . group ( 1 ) ) * 24 * 7 )
influxdb_duration_format = ' %s h0m0s ' % ( int ( duration_lookup . group ( 1 ) ) * 24 * 7 )
elif duration == ' INF ' :
elif duration == ' INF ' :
influxdb_duration_format = ' INF '
influxdb_duration_format = ' 0 '
if not retention_policy [ ' duration ' ] == influxdb_duration_format or not retention_policy [ ' replicaN ' ] == int ( replication ) or not retention_policy [ ' default ' ] == default :
if not retention_policy [ ' duration ' ] == influxdb_duration_format or not retention_policy [ ' replicaN ' ] == int ( replication ) or not retention_policy [ ' default ' ] == default :
if not module . check_mode :
if not module . check_mode :