Answer the question
In order to leave comments, you need to log in
Can you help me with ansible-playbook?
In the playbook for deploying Elasticsearch, I take a step to create indexes, of the form:
- name: Create Elasticsearch indices
uri:
url: "http://127.0.0.1:9200/entry"
method: PUT
body: "{{ lookup('file', '/opt/elastic/mapping/entry_mapping.json') }}"
status_code: 200
HEADER_Content-Type: "application/json"
body_format: json
msg: 'An unhandled exception occurred while running the lookup plugin ''file''. Error was a <class ''ansible.errors.AnsibleError''>, original message: could not locate file in lookup: /opt/elastic/mapping/entry_mapping.json'
Answer the question
In order to leave comments, you need to log in
The file must be on the Elastict server or it does not exist or is right
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question