--- - name: Ensure elasticsearch is started service: name={{instance_init_script | basename}} state=started enabled=yes - name: Wait for elasticsearch to startup wait_for: host={{es_api_host}} port={{es_api_port}} delay=10 - name: activate-license include: ./handlers/security/elasticsearch-xpack-activation.yml when: es_enable_xpack and es_xpack_license is defined and es_xpack_license != '' - name: load-native-realms include: ./handlers/security/elasticsearch-security-native.yml when: (es_users is defined and es_users.native is defined) or (es_roles is defined and es_roles.native is defined)