diff --git a/templates/td-agent.conf b/templates/td-agent.conf
index 559d0fb3e759b2a0df45f77c902867bda88b6841..28f766ffef823fb4c86b0d9216db887176162cfe 100644
--- a/templates/td-agent.conf
+++ b/templates/td-agent.conf
@@ -276,6 +276,8 @@
   @type elasticsearch
   host 127.0.0.1
   port 9200
+  user elastic
+  password {{ elasticsearch.users.elastic|default("") }}
   include_tag_key true
   tag_key @log_name
   index_name ansible
@@ -294,6 +296,8 @@
   @type elasticsearch
   host 127.0.0.1
   port 9200
+  user elastic
+  password {{ elasticsearch.users.elastic|default("") }}
   include_tag_key true
   tag_key @log_name
   index_name uptime
@@ -312,6 +316,8 @@
   @type elasticsearch
   host 127.0.0.1
   port 9200
+  user elastic
+  password {{ elasticsearch.users.elastic|default("") }}
   include_tag_key true
   tag_key @log_name
   index_name haproxy
@@ -331,6 +337,8 @@
   logstash_format true
   host 127.0.0.1
   port 9200
+  user elastic
+  password {{ elasticsearch.users.elastic|default("") }}
   include_tag_key true
   tag_key @log_name
   index_name fluentd