`
- name: Configure filebeat
lineinfile:
dest= /etc/filebeat/filebeat.yml
regexp = “{{ item.regexp }}”
line = “{{ item.regexp }}”
with_items:
{ regexp: ‘#output.elasticsearch:’, line: ‘output.elasticsearch:\n hosts: [“X.x.x.x:9200”]’ }
{ regexp: ‘#setup.kibana:’, “line”: ‘setup.kibana::\n hosts: [“X.x.x.x:5601”]\n user: “admin”\n password: “Spiderman1”’ }
`
The error appears to have been in ‘/home/user/.ansible/roles/filebeat/tasks/main.yml’: line 12, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
What i am doing wrong ?