diff --git a/lib/ansible/module_utils/influxdb.py b/lib/ansible/module_utils/influxdb.py index 3278b6469fa..8f54a22e5c2 100644 --- a/lib/ansible/module_utils/influxdb.py +++ b/lib/ansible/module_utils/influxdb.py @@ -36,6 +36,7 @@ class InfluxDb(): self.check_lib() self.hostname = self.params['hostname'] self.port = self.params['port'] + self.path = self.params['path'] self.username = self.params['username'] self.password = self.params['password'] self.database_name = self.params.get('database_name') @@ -52,6 +53,7 @@ class InfluxDb(): return dict( hostname=dict(type='str', default='localhost'), port=dict(type='int', default=8086), + path=dict(type='str', default=''), username=dict(type='str', default='root', aliases=['login_username']), password=dict(type='str', default='root', no_log=True, aliases=['login_password']), ssl=dict(type='bool', default=False), @@ -67,6 +69,7 @@ class InfluxDb(): args = dict( host=self.hostname, port=self.port, + path=self.path, username=self.username, password=self.password, database=self.database_name, diff --git a/lib/ansible/plugins/doc_fragments/influxdb.py b/lib/ansible/plugins/doc_fragments/influxdb.py index 0489ff7ae6c..2bee3007f62 100644 --- a/lib/ansible/plugins/doc_fragments/influxdb.py +++ b/lib/ansible/plugins/doc_fragments/influxdb.py @@ -34,6 +34,11 @@ options: - The port on which InfluxDB server is listening type: int default: 8086 + path: + description: + - The path on which InfluxDB server is accessible + type: str + version_added: "2.10" validate_certs: description: - If set to C(no), the SSL certificates will not be validated.