Herman van Rink 2 weeks ago committed by GitHub
commit 0e39f36ca0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,4 @@
---
minor_changes:
- csvfile - let the config system do the typecasting.

@ -15,7 +15,8 @@ DOCUMENTATION = r"""
options:
col:
description: column to return (0 indexed).
default: "1"
default: 1
type: int
keycol:
description: column to search in (0 indexed).
default: 0
@ -147,7 +148,7 @@ class LookupModule(LookupBase):
for row in creader:
if len(row) and row[keycol] == key:
return row[int(col)]
return row[col]
except Exception as e:
raise AnsibleError("csvfile: %s" % to_native(e))

Loading…
Cancel
Save