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. - name: Include optional user and group creation.
when: (es_user_id is defined) and (es_group_id is defined) 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 - name: Debian - Get installed elasticsearch version
command: dpkg-query --showformat='${Version}' --show {{ es_package_name }} command: dpkg-query --showformat='${Version}' --show {{ es_package_name }}

View file

@ -26,7 +26,7 @@
when: es_use_repository when: es_use_repository
- name: RedHat - include versionlock - 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 - name: RedHat - Remove the other elasticsearch package if switching between OSS and standard
become: yes become: yes
@ -36,7 +36,7 @@
- name: Include optional user and group creation. - name: Include optional user and group creation.
when: (es_user_id is defined) and (es_group_id is defined) 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 - name: RedHat - Install Elasticsearch
become: yes become: yes

View file

@ -1,9 +1,9 @@
--- ---
- name: Include specific Elasticsearch - name: Include specific Elasticsearch
include: elasticsearch-Debian.yml include_tasks: elasticsearch-Debian.yml
when: ansible_os_family == 'Debian' when: ansible_os_family == 'Debian'
- name: Include specific Elasticsearch - name: Include specific Elasticsearch
include: elasticsearch-RedHat.yml include_tasks: elasticsearch-RedHat.yml
when: ansible_os_family == 'RedHat' when: ansible_os_family == 'RedHat'

View file

@ -12,49 +12,49 @@
- always - always
- name: set compatibility variables - name: set compatibility variables
include: compatibility-variables.yml include_tasks: compatibility-variables.yml
tags: tags:
- always - always
- name: check-set-parameters - name: check-set-parameters
include: elasticsearch-parameters.yml include_tasks: elasticsearch-parameters.yml
tags: tags:
- always - always
- name: use snapshot release - name: use snapshot release
include: snapshot-release.yml include_tasks: snapshot-release.yml
when: es_use_snapshot_release when: es_use_snapshot_release
- name: include java.yml - name: include java.yml
include: java.yml include_tasks: java.yml
when: es_java_install when: es_java_install
tags: tags:
- java - java
- name: include elasticsearch.yml - name: include elasticsearch.yml
include: elasticsearch.yml include_tasks: elasticsearch.yml
tags: tags:
- install - install
- name: include elasticsearch-config.yml - name: include elasticsearch-config.yml
include: elasticsearch-config.yml include_tasks: elasticsearch-config.yml
tags: tags:
- config - config
- name: include elasticsearch-plugins.yml - name: include elasticsearch-plugins.yml
include: elasticsearch-plugins.yml include_tasks: elasticsearch-plugins.yml
when: es_plugins is defined or es_plugins_reinstall when: es_plugins is defined or es_plugins_reinstall
tags: tags:
- plugins - plugins
#We always execute xpack as we may need to remove features #We always execute xpack as we may need to remove features
- name: include xpack/elasticsearch-xpack.yml - name: include xpack/elasticsearch-xpack.yml
include: xpack/elasticsearch-xpack.yml include_tasks: xpack/elasticsearch-xpack.yml
tags: tags:
- xpack - xpack
- name: include elasticsearch-ssl.yml - name: include elasticsearch-ssl.yml
include: elasticsearch-ssl.yml include_tasks: elasticsearch-ssl.yml
when: es_enable_http_ssl or es_enable_transport_ssl when: es_enable_http_ssl or es_enable_transport_ssl
tags: tags:
- xpack - xpack
@ -88,25 +88,25 @@
when: manage_native_realm | bool when: manage_native_realm | bool
- name: activate-license - 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 != '' when: es_start_service and not oss_version and es_xpack_license is defined and es_xpack_license != ''
run_once: True run_once: True
- name: activate-trial - 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 when: es_start_service and not oss_version and es_xpack_trial
run_once: True run_once: True
#perform security actions here now elasticsearch is started #perform security actions here now elasticsearch is started
- name: include xpack/security/elasticsearch-security-native.yml - 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 when: manage_native_realm | bool
run_once: True 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. #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. #We also do after the native realm to ensure any changes are applied here first and its denf up.
- name: include elasticsearch-template.yml - name: include elasticsearch-template.yml
include: elasticsearch-template.yml include_tasks: elasticsearch-template.yml
when: es_templates | bool when: es_templates | bool
tags: tags:
- templates - templates

View file

@ -2,7 +2,7 @@
#Security configuration #Security configuration
- name: include security/elasticsearch-security.yml - name: include security/elasticsearch-security.yml
include: security/elasticsearch-security.yml include_tasks: security/elasticsearch-security.yml
when: not oss_version when: not oss_version
#Make sure elasticsearch.keystore has correct Permissions #Make sure elasticsearch.keystore has correct Permissions

View file

@ -73,7 +73,7 @@
#-----------------------------FILE BASED REALM---------------------------------------- #-----------------------------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) when: (es_users is defined and es_users.file is defined) or (es_roles is defined and es_roles.file is defined)
#-----------------------------ROLE MAPPING ---------------------------------------- #-----------------------------ROLE MAPPING ----------------------------------------

View file

@ -2,7 +2,7 @@
- name: Setup Elasticsearch with custom config files - name: Setup Elasticsearch with custom config files
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,6 +2,6 @@
- name: Setup Elasticsearch using default configuration - name: Setup Elasticsearch using default configuration
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch

View file

@ -2,7 +2,7 @@
- name: Elasticsearch Xpack HTTP different keystore and truststore with password - name: Elasticsearch Xpack HTTP different keystore and truststore with password
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Deploy Elasticsearch OSS version - name: Deploy Elasticsearch OSS version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:
@ -12,7 +12,7 @@
- name: Upgrade to Elasticsearch default version - name: Upgrade to Elasticsearch default version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Deploy Elasticsearch OSS previous version - name: Deploy Elasticsearch OSS previous version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:
@ -12,7 +12,7 @@
- name: Deploy Elasticsearch OSS latest version - name: Deploy Elasticsearch OSS latest version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Setup Elasticsearch OSS 6.x - name: Setup Elasticsearch OSS 6.x
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Elasticsearch Xpack HTTP different keystore and truststore with password - name: Elasticsearch Xpack HTTP different keystore and truststore with password
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Setup Elasticsearch with security enabled and a trial license - name: Setup Elasticsearch with security enabled and a trial license
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:

View file

@ -2,7 +2,7 @@
- name: Deploy Elasticsearch previous version - name: Deploy Elasticsearch previous version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch
vars: vars:
@ -11,6 +11,6 @@
- name: Deploy Elasticsearch latest version - name: Deploy Elasticsearch latest version
hosts: localhost hosts: localhost
post_tasks: post_tasks:
- include: elasticsearch/test/integration/debug.yml - include_tasks: elasticsearch/test/integration/debug.yml
roles: roles:
- elasticsearch - elasticsearch