diff --git a/tasks/elasticsearch-Debian.yml b/tasks/elasticsearch-Debian.yml index f6e4c17..d93e627 100644 --- a/tasks/elasticsearch-Debian.yml +++ b/tasks/elasticsearch-Debian.yml @@ -65,7 +65,7 @@ - name: Include optional user and group creation. when: (es_user_id is defined) and (es_group_id is defined) - include: elasticsearch-optional-user.yml + include_tasks: elasticsearch-optional-user.yml - name: Debian - Get installed elasticsearch version command: dpkg-query --showformat='${Version}' --show {{ es_package_name }} diff --git a/tasks/elasticsearch-RedHat.yml b/tasks/elasticsearch-RedHat.yml index 7d53fbf..e1debfc 100644 --- a/tasks/elasticsearch-RedHat.yml +++ b/tasks/elasticsearch-RedHat.yml @@ -26,7 +26,7 @@ when: es_use_repository - name: RedHat - include versionlock - include: elasticsearch-RedHat-version-lock.yml + include_tasks: elasticsearch-RedHat-version-lock.yml - name: RedHat - Remove the other elasticsearch package if switching between OSS and standard become: yes @@ -36,7 +36,7 @@ - name: Include optional user and group creation. when: (es_user_id is defined) and (es_group_id is defined) - include: elasticsearch-optional-user.yml + include_tasks: elasticsearch-optional-user.yml - name: RedHat - Install Elasticsearch become: yes diff --git a/tasks/elasticsearch.yml b/tasks/elasticsearch.yml index 05fd93b..d6e5cb7 100644 --- a/tasks/elasticsearch.yml +++ b/tasks/elasticsearch.yml @@ -1,9 +1,9 @@ --- - name: Include specific Elasticsearch - include: elasticsearch-Debian.yml + include_tasks: elasticsearch-Debian.yml when: ansible_os_family == 'Debian' - name: Include specific Elasticsearch - include: elasticsearch-RedHat.yml + include_tasks: elasticsearch-RedHat.yml when: ansible_os_family == 'RedHat' diff --git a/tasks/main.yml b/tasks/main.yml index c0ad700..855c5de 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,49 +12,49 @@ - always - name: set compatibility variables - include: compatibility-variables.yml + include_tasks: compatibility-variables.yml tags: - always - name: check-set-parameters - include: elasticsearch-parameters.yml + include_tasks: elasticsearch-parameters.yml tags: - always - name: use snapshot release - include: snapshot-release.yml + include_tasks: snapshot-release.yml when: es_use_snapshot_release - name: include java.yml - include: java.yml + include_tasks: java.yml when: es_java_install tags: - java - name: include elasticsearch.yml - include: elasticsearch.yml + include_tasks: elasticsearch.yml tags: - install - name: include elasticsearch-config.yml - include: elasticsearch-config.yml + include_tasks: elasticsearch-config.yml tags: - config - name: include elasticsearch-plugins.yml - include: elasticsearch-plugins.yml + include_tasks: elasticsearch-plugins.yml when: es_plugins is defined or es_plugins_reinstall tags: - plugins #We always execute xpack as we may need to remove features - name: include xpack/elasticsearch-xpack.yml - include: xpack/elasticsearch-xpack.yml + include_tasks: xpack/elasticsearch-xpack.yml tags: - xpack - name: include elasticsearch-ssl.yml - include: elasticsearch-ssl.yml + include_tasks: elasticsearch-ssl.yml when: es_enable_http_ssl or es_enable_transport_ssl tags: - xpack @@ -88,25 +88,25 @@ when: manage_native_realm | bool - name: activate-license - include: ./xpack/security/elasticsearch-xpack-activation.yml + include_tasks: ./xpack/security/elasticsearch-xpack-activation.yml when: es_start_service and not oss_version and es_xpack_license is defined and es_xpack_license != '' run_once: True - name: activate-trial - include: ./xpack/security/elasticsearch-xpack-trial-activation.yml + include_tasks: ./xpack/security/elasticsearch-xpack-trial-activation.yml when: es_start_service and not oss_version and es_xpack_trial run_once: True #perform security actions here now elasticsearch is started - name: include xpack/security/elasticsearch-security-native.yml - include: ./xpack/security/elasticsearch-security-native.yml + include_tasks: ./xpack/security/elasticsearch-security-native.yml when: manage_native_realm | bool run_once: True #Templates done after restart - handled by flushing the handlers. e.g. suppose user removes security on a running node and doesn't specify es_api_basic_auth_username and es_api_basic_auth_password. The templates will subsequently not be removed if we don't wait for the node to restart. #We also do after the native realm to ensure any changes are applied here first and its denf up. - name: include elasticsearch-template.yml - include: elasticsearch-template.yml + include_tasks: elasticsearch-template.yml when: es_templates | bool tags: - templates diff --git a/tasks/xpack/elasticsearch-xpack.yml b/tasks/xpack/elasticsearch-xpack.yml index 9b49408..84528f4 100644 --- a/tasks/xpack/elasticsearch-xpack.yml +++ b/tasks/xpack/elasticsearch-xpack.yml @@ -2,7 +2,7 @@ #Security configuration - name: include security/elasticsearch-security.yml - include: security/elasticsearch-security.yml + include_tasks: security/elasticsearch-security.yml when: not oss_version #Make sure elasticsearch.keystore has correct Permissions diff --git a/tasks/xpack/security/elasticsearch-security.yml b/tasks/xpack/security/elasticsearch-security.yml index 184ab44..1d9aee4 100644 --- a/tasks/xpack/security/elasticsearch-security.yml +++ b/tasks/xpack/security/elasticsearch-security.yml @@ -73,7 +73,7 @@ #-----------------------------FILE BASED REALM---------------------------------------- -- include: elasticsearch-security-file.yml +- include_tasks: elasticsearch-security-file.yml when: (es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined) #-----------------------------ROLE MAPPING ---------------------------------------- diff --git a/test/integration/custom-config.yml b/test/integration/custom-config.yml index ed2dbab..633f6b2 100644 --- a/test/integration/custom-config.yml +++ b/test/integration/custom-config.yml @@ -2,7 +2,7 @@ - name: Setup Elasticsearch with custom config files hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/default.yml b/test/integration/default.yml index 7a61d17..fb76ad1 100644 --- a/test/integration/default.yml +++ b/test/integration/default.yml @@ -2,6 +2,6 @@ - name: Setup Elasticsearch using default configuration hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch diff --git a/test/integration/license.yml b/test/integration/license.yml index cd0e234..c77e56d 100644 --- a/test/integration/license.yml +++ b/test/integration/license.yml @@ -2,7 +2,7 @@ - name: Elasticsearch Xpack HTTP different keystore and truststore with password hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/oss-to-default-upgrade.yml b/test/integration/oss-to-default-upgrade.yml index 774f725..8bf3112 100644 --- a/test/integration/oss-to-default-upgrade.yml +++ b/test/integration/oss-to-default-upgrade.yml @@ -2,7 +2,7 @@ - name: Deploy Elasticsearch OSS version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: @@ -12,7 +12,7 @@ - name: Upgrade to Elasticsearch default version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/oss-upgrade.yml b/test/integration/oss-upgrade.yml index 153b02a..1cec4d5 100644 --- a/test/integration/oss-upgrade.yml +++ b/test/integration/oss-upgrade.yml @@ -2,7 +2,7 @@ - name: Deploy Elasticsearch OSS previous version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: @@ -12,7 +12,7 @@ - name: Deploy Elasticsearch OSS latest version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/oss.yml b/test/integration/oss.yml index 6c6ba06..95f242b 100644 --- a/test/integration/oss.yml +++ b/test/integration/oss.yml @@ -2,7 +2,7 @@ - name: Setup Elasticsearch OSS 6.x hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/security.yml b/test/integration/security.yml index bfedebf..a00445c 100644 --- a/test/integration/security.yml +++ b/test/integration/security.yml @@ -2,7 +2,7 @@ - name: Elasticsearch Xpack HTTP different keystore and truststore with password hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/trial.yml b/test/integration/trial.yml index 3221713..bf253f1 100644 --- a/test/integration/trial.yml +++ b/test/integration/trial.yml @@ -2,7 +2,7 @@ - name: Setup Elasticsearch with security enabled and a trial license hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: diff --git a/test/integration/upgrade.yml b/test/integration/upgrade.yml index 2a1a27b..4c6fa1a 100644 --- a/test/integration/upgrade.yml +++ b/test/integration/upgrade.yml @@ -2,7 +2,7 @@ - name: Deploy Elasticsearch previous version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch vars: @@ -11,6 +11,6 @@ - name: Deploy Elasticsearch latest version hosts: localhost post_tasks: - - include: elasticsearch/test/integration/debug.yml + - include_tasks: elasticsearch/test/integration/debug.yml roles: - elasticsearch