--- - name: enable and start service ansible.builtin.service: name: elasticsearch state: started enabled: true tags: elasticsearch - name: wait for api is available ansible.builtin.wait_for: port: 9200 timeout: 10 tags: elasticsearch