diff --git a/tasks/elasticsearch-Debian.yml b/tasks/elasticsearch-Debian.yml index f6e4c17c..3f716486 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 + ansible.builtin.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 7d53fbf1..f2ff9618 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 + ansible.builtin.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 + ansible.builtin.include_tasks: elasticsearch-optional-user.yml - name: RedHat - Install Elasticsearch become: yes diff --git a/tasks/elasticsearch.yml b/tasks/elasticsearch.yml index 05fd93bc..b128aa2c 100644 --- a/tasks/elasticsearch.yml +++ b/tasks/elasticsearch.yml @@ -1,9 +1,9 @@ --- - name: Include specific Elasticsearch - include: elasticsearch-Debian.yml + ansible.builtin.include_tasks: elasticsearch-Debian.yml when: ansible_os_family == 'Debian' - name: Include specific Elasticsearch - include: elasticsearch-RedHat.yml + ansible.builtin.include_tasks: elasticsearch-RedHat.yml when: ansible_os_family == 'RedHat' diff --git a/tasks/main.yml b/tasks/main.yml index c0ad7004..81828a29 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -12,49 +12,49 @@ - always - name: set compatibility variables - include: compatibility-variables.yml + ansible.builtin.include_tasks: compatibility-variables.yml tags: - always - name: check-set-parameters - include: elasticsearch-parameters.yml + ansible.builtin.include_tasks: elasticsearch-parameters.yml tags: - always - name: use snapshot release - include: snapshot-release.yml + ansible.builtin.include_tasks: snapshot-release.yml when: es_use_snapshot_release - name: include java.yml - include: java.yml + ansible.builtin.include_tasks: java.yml when: es_java_install tags: - java - name: include elasticsearch.yml - include: elasticsearch.yml + ansible.builtin.include_tasks: elasticsearch.yml tags: - install - name: include elasticsearch-config.yml - include: elasticsearch-config.yml + ansible.builtin.include_tasks: elasticsearch-config.yml tags: - config - name: include elasticsearch-plugins.yml - include: elasticsearch-plugins.yml + ansible.builtin.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 + ansible.builtin.include_tasks: xpack/elasticsearch-xpack.yml tags: - xpack - name: include elasticsearch-ssl.yml - include: elasticsearch-ssl.yml + ansible.builtin.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 + ansible.builtin.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 + ansible.builtin.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 + ansible.builtin.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 + ansible.builtin.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 9b494083..28e9f9d4 100644 --- a/tasks/xpack/elasticsearch-xpack.yml +++ b/tasks/xpack/elasticsearch-xpack.yml @@ -2,13 +2,13 @@ #Security configuration - name: include security/elasticsearch-security.yml - include: security/elasticsearch-security.yml + ansible.builtin.include_tasks: security/elasticsearch-security.yml when: not oss_version #Make sure elasticsearch.keystore has correct Permissions - name: Set elasticsearch.keystore Permissions become: yes - file: + file: state: file path: "{{ es_conf_dir }}/elasticsearch.keystore" owner: root