Change deprecated include to include_tasks

This commit is contained in:
Santeri Kainulainen 2025-11-07 14:00:38 +02:00
parent af05c6470e
commit a9b0d193d6
15 changed files with 32 additions and 32 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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 ----------------------------------------

View file

@ -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:

View file

@ -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

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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