From ee04495472ec6fa4e251442eedb9b0400607214f Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Wed, 15 Mar 2023 14:46:33 +0100 Subject: [PATCH 01/20] fix(exporter): remove node exporter from tdp-collection --- playbooks/exporter_node_install.yml | 14 ---- playbooks/exporter_node_restart.yml | 14 ---- playbooks/exporter_node_start.yml | 14 ---- playbooks/exporter_node_status.yml | 14 ---- playbooks/exporter_node_stop.yml | 14 ---- playbooks/meta/all.yml | 3 - playbooks/meta/all_per_service.yml | 2 +- playbooks/meta/exporter.yml | 3 +- playbooks/meta/tdp-cluster.yml | 8 -- roles/exporter/node/handlers | 1 - roles/exporter/node/tasks/install.yml | 75 ------------------- roles/exporter/node/tasks/restart.yml | 9 --- roles/exporter/node/tasks/start.yml | 9 --- roles/exporter/node/tasks/status.yml | 12 --- roles/exporter/node/tasks/stop.yml | 9 --- .../node/templates/node-exporter.service.j2 | 14 ---- .../templates/tmpfiles-node-exporter.conf.j2 | 1 - tdp_lib_dag/exporter.yml | 14 ---- tdp_vars_defaults/exporter/exporter.yml | 24 ------ tdp_vars_defaults/tdp-cluster/tdp-cluster.yml | 2 - 20 files changed, 2 insertions(+), 254 deletions(-) delete mode 100644 playbooks/exporter_node_install.yml delete mode 100644 playbooks/exporter_node_restart.yml delete mode 100644 playbooks/exporter_node_start.yml delete mode 100644 playbooks/exporter_node_status.yml delete mode 100644 playbooks/exporter_node_stop.yml delete mode 100644 playbooks/meta/tdp-cluster.yml delete mode 120000 roles/exporter/node/handlers delete mode 100644 roles/exporter/node/tasks/install.yml delete mode 100644 roles/exporter/node/tasks/restart.yml delete mode 100644 roles/exporter/node/tasks/start.yml delete mode 100644 roles/exporter/node/tasks/status.yml delete mode 100644 roles/exporter/node/tasks/stop.yml delete mode 100644 roles/exporter/node/templates/node-exporter.service.j2 delete mode 100644 roles/exporter/node/templates/tmpfiles-node-exporter.conf.j2 diff --git a/playbooks/exporter_node_install.yml b/playbooks/exporter_node_install.yml deleted file mode 100644 index 0a211c7e..00000000 --- a/playbooks/exporter_node_install.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: node-exporter install - hosts: exporter_node - tasks: - - tosit.tdp.resolve: # noqa unnamed-task - node_name: exporter_node - - name: Install node exporter - import_role: - name: tosit.tdp.exporter.node - tasks_from: install - - meta: clear_facts # noqa unnamed-task diff --git a/playbooks/exporter_node_restart.yml b/playbooks/exporter_node_restart.yml deleted file mode 100644 index ef75f287..00000000 --- a/playbooks/exporter_node_restart.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: node-exporter restart - hosts: exporter_node - tasks: - - tosit.tdp.resolve: # noqa unnamed-task - node_name: exporter_node - - name: Restart node exporter - import_role: - name: tosit.tdp.exporter.node - tasks_from: restart - - meta: clear_facts # noqa unnamed-task diff --git a/playbooks/exporter_node_start.yml b/playbooks/exporter_node_start.yml deleted file mode 100644 index ba059a9b..00000000 --- a/playbooks/exporter_node_start.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: node-exporter start - hosts: exporter_node - tasks: - - tosit.tdp.resolve: # noqa unnamed-task - node_name: exporter_node - - name: Start node exporter - import_role: - name: tosit.tdp.exporter.node - tasks_from: start - - meta: clear_facts # noqa unnamed-task diff --git a/playbooks/exporter_node_status.yml b/playbooks/exporter_node_status.yml deleted file mode 100644 index aca70337..00000000 --- a/playbooks/exporter_node_status.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: node-exporter status - hosts: exporter_node - tasks: - - tosit.tdp.resolve: # noqa unnamed-task - node_name: exporter_node - - name: node exporter status - import_role: - name: tosit.tdp.exporter.node - tasks_from: status - - meta: clear_facts # noqa unnamed-task diff --git a/playbooks/exporter_node_stop.yml b/playbooks/exporter_node_stop.yml deleted file mode 100644 index 4e1cf910..00000000 --- a/playbooks/exporter_node_stop.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: node-exporter stop - hosts: exporter_node - tasks: - - tosit.tdp.resolve: # noqa unnamed-task - node_name: exporter_node - - name: Stop node exporter - import_role: - name: tosit.tdp.exporter.node - tasks_from: stop - - meta: clear_facts # noqa unnamed-task diff --git a/playbooks/meta/all.yml b/playbooks/meta/all.yml index ba8a4469..88989081 100644 --- a/playbooks/meta/all.yml +++ b/playbooks/meta/all.yml @@ -3,7 +3,6 @@ --- - import_playbook: ../exporter_jmx_install.yml -- import_playbook: ../exporter_node_install.yml # exporter_install - import_playbook: ../zookeeper_client_install.yml - import_playbook: ../zookeeper_server_install.yml @@ -77,9 +76,7 @@ # tdp-cluster_install # tdp-cluster_config # exporter_jmx_config -# exporter_node_config # exporter_config -- import_playbook: ../exporter_node_start.yml # exporter_start # exporter_init - import_playbook: ../zookeeper_client_config.yml diff --git a/playbooks/meta/all_per_service.yml b/playbooks/meta/all_per_service.yml index 49775a3e..935f8737 100644 --- a/playbooks/meta/all_per_service.yml +++ b/playbooks/meta/all_per_service.yml @@ -2,8 +2,8 @@ # SPDX-License-Identifier: Apache-2.0 --- +# tdp-cluster - import_playbook: exporter.yml -- import_playbook: tdp-cluster.yml - import_playbook: zookeeper.yml - import_playbook: hadoop.yml - import_playbook: ranger.yml diff --git a/playbooks/meta/exporter.yml b/playbooks/meta/exporter.yml index 67a6cceb..ae9a3919 100644 --- a/playbooks/meta/exporter.yml +++ b/playbooks/meta/exporter.yml @@ -3,9 +3,8 @@ --- - import_playbook: ../exporter_jmx_install.yml -- import_playbook: ../exporter_node_install.yml # exporter_install +# exporter_jmx_config # exporter_config -- import_playbook: ../exporter_node_start.yml # exporter_start # exporter_init diff --git a/playbooks/meta/tdp-cluster.yml b/playbooks/meta/tdp-cluster.yml deleted file mode 100644 index a55d085b..00000000 --- a/playbooks/meta/tdp-cluster.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -# tdp-cluster_install -# tdp-cluster_config -# tdp-cluster_start -# tdp-cluster_init diff --git a/roles/exporter/node/handlers b/roles/exporter/node/handlers deleted file mode 120000 index fcbfc8c0..00000000 --- a/roles/exporter/node/handlers +++ /dev/null @@ -1 +0,0 @@ -../../common/handlers \ No newline at end of file diff --git a/roles/exporter/node/tasks/install.yml b/roles/exporter/node/tasks/install.yml deleted file mode 100644 index ad4ce78f..00000000 --- a/roles/exporter/node/tasks/install.yml +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Ensure node exporter's group exists - include_role: - name: tosit.tdp.utils.group - vars: - group: "{{ node_exporter_group }}" - -- name: Ensure node exporter's user exists - include_role: - name: tosit.tdp.utils.user - vars: - user: "{{ node_exporter_user }}" - group: "{{ node_exporter_group }}" - -- name: Upload {{ node_exporter_dist_file }} - copy: - src: "{{ binaries_local_dir }}/{{ node_exporter_dist_file }}" - dest: "{{ binaries_upload_dir }}" - owner: root - group: root - mode: "644" - diff: false - -- name: Ensure {{ node_exporter_root_dir }} exists - file: - path: "{{ node_exporter_root_dir }}" - state: directory - owner: root - group: root - mode: "755" - -- name: Extract {{ node_exporter_dist_file }} - unarchive: - src: "{{ binaries_upload_dir }}/{{ node_exporter_dist_file }}" - dest: "{{ node_exporter_root_dir }}" - group: root - owner: root - mode: "755" - remote_src: true - creates: "{{ node_exporter_root_dir }}/{{ node_exporter_release }}" - -- name: Create symbolic link to node_exporter installation - file: - src: "{{ node_exporter_root_dir }}/{{ node_exporter_release }}" - dest: "{{ node_exporter_install_dir }}" - state: link - -- name: Create directory for pid - file: - path: "{{ node_exporter_pid_dir }}" - state: directory - group: root - owner: root - mode: "755" - -- name: Template node-exporter tmpfiles.d - template: - src: tmpfiles-node-exporter.conf.j2 - dest: /etc/tmpfiles.d/node-exporter.conf - group: root - owner: root - mode: "644" - -- name: Template node-exporter service file - template: - src: node-exporter.service.j2 - dest: /usr/lib/systemd/system/node-exporter.service - group: root - owner: root - mode: "644" - notify: - - systemctl daemon-reload diff --git a/roles/exporter/node/tasks/restart.yml b/roles/exporter/node/tasks/restart.yml deleted file mode 100644 index 51e43782..00000000 --- a/roles/exporter/node/tasks/restart.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Restart node-exporter - service: - name: node-exporter - state: restarted - enabled: "{{ node_exporter_start_on_boot }}" diff --git a/roles/exporter/node/tasks/start.yml b/roles/exporter/node/tasks/start.yml deleted file mode 100644 index f37db892..00000000 --- a/roles/exporter/node/tasks/start.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Start node-exporter - service: - name: node-exporter - state: started - enabled: "{{ node_exporter_start_on_boot }}" diff --git a/roles/exporter/node/tasks/status.yml b/roles/exporter/node/tasks/status.yml deleted file mode 100644 index cefdbbaa..00000000 --- a/roles/exporter/node/tasks/status.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Populate service facts - service_facts: - -- name: Assert node-exporter is running - assert: - that: - - ansible_facts.services['node-exporter.service'].state == "running" - quiet: true diff --git a/roles/exporter/node/tasks/stop.yml b/roles/exporter/node/tasks/stop.yml deleted file mode 100644 index e6f7f35c..00000000 --- a/roles/exporter/node/tasks/stop.yml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- name: Stop node-exporter - service: - name: node-exporter - state: stopped - enabled: "{{ node_exporter_start_on_boot }}" diff --git a/roles/exporter/node/templates/node-exporter.service.j2 b/roles/exporter/node/templates/node-exporter.service.j2 deleted file mode 100644 index 8131a7fc..00000000 --- a/roles/exporter/node/templates/node-exporter.service.j2 +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Prometheus Node Exporter -After=network-online.target -Wants=network-online.target - -[Service] -Type=simple -User={{ node_exporter_user }} -Group={{ node_exporter_group }} -PIDFile={{ node_exporter_pid_dir }}/node-exporter.pid -ExecStart={{ node_exporter_install_dir }}/node_exporter {{ node_exporter_collectors }} {{ node_exporter_web_listen_address }} - -[Install] -WantedBy=multi-user.target diff --git a/roles/exporter/node/templates/tmpfiles-node-exporter.conf.j2 b/roles/exporter/node/templates/tmpfiles-node-exporter.conf.j2 deleted file mode 100644 index c9de6230..00000000 --- a/roles/exporter/node/templates/tmpfiles-node-exporter.conf.j2 +++ /dev/null @@ -1 +0,0 @@ -d {{ node_exporter_pid_dir }} 0755 root root - diff --git a/tdp_lib_dag/exporter.yml b/tdp_lib_dag/exporter.yml index 08446f59..28683f87 100644 --- a/tdp_lib_dag/exporter.yml +++ b/tdp_lib_dag/exporter.yml @@ -2,17 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 --- -- name: exporter_node_install - depends_on: [] - -- name: exporter_node_config - noop: yes - depends_on: - - tdp-cluster_config - -- name: exporter_node_start - depends_on: - - exporter_node_config - name: exporter_jmx_install depends_on: [] @@ -25,21 +14,18 @@ - name: exporter_install noop: yes depends_on: - - exporter_node_install - exporter_jmx_install - name: exporter_config noop: yes depends_on: - exporter_install - - exporter_node_config - exporter_jmx_config - name: exporter_start noop: yes depends_on: - exporter_config - - exporter_node_start - name: exporter_init noop: yes diff --git a/tdp_vars_defaults/exporter/exporter.yml b/tdp_vars_defaults/exporter/exporter.yml index 29de5481..87ffd618 100644 --- a/tdp_vars_defaults/exporter/exporter.yml +++ b/tdp_vars_defaults/exporter/exporter.yml @@ -15,27 +15,3 @@ jmx_exporter_install_file: "{{ jmx_exporter_root_dir }}/jmx-exporter.jar" # jmx exporter configuration directory jmx_exporter_conf_dir: /etc/jmx-exporter - -############## -#node-exporter# -############## -# node-exporter users and group -node_exporter_user: node-exporter -node_exporter_group: node-exporter - -# node exporter version -node_exporter_release: node_exporter-1.3.1.linux-amd64 -node_exporter_dist_file: "{{ node_exporter_release }}.tar.gz" - -# node exporter installation directory -node_exporter_root_dir: /opt/tdp -node_exporter_install_dir: "{{ node_exporter_root_dir }}/node-exporter" -node_exporter_pid_dir: /run/node-exporter - -# node exporter configuration directory -node_exporter_conf_dir: /etc/node-exporter -node_exporter_collectors: --collector.systemd --collector.ntp -node_exporter_web_listen_address: --web.listen-address=:{{ exporter_node_http_port }} - -# node exporter service start on boot policies -node_exporter_start_on_boot: false diff --git a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml index 408f7dbe..4edaf529 100644 --- a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml +++ b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml @@ -130,8 +130,6 @@ spark3_ui_bind_port: 54000 knox_gateway_http_port: 8443 # Exporter ports -exporter_node_http_port: 9100 - exporter_hdfs_nn_http_port: 18101 exporter_hdfs_zkfc_http_port: 18102 exporter_hdfs_jn_http_port: 18103 From f50e8a7312b340d1b516e5eb355894de6ed667a0 Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Thu, 6 Apr 2023 11:37:06 +0200 Subject: [PATCH 02/20] fix(ranger): move kms logs to specific dir --- tdp_vars_defaults/ranger/ranger_kms.yml | 2 ++ tdp_vars_defaults/tdp-cluster/tdp-cluster.yml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tdp_vars_defaults/ranger/ranger_kms.yml b/tdp_vars_defaults/ranger/ranger_kms.yml index 56a29053..b85ad312 100644 --- a/tdp_vars_defaults/ranger/ranger_kms.yml +++ b/tdp_vars_defaults/ranger/ranger_kms.yml @@ -18,3 +18,5 @@ kms_site: hadoop.kms.proxyuser.yarn.hosts: '*' hadoop.kms.proxyuser.hive.groups: '*' hadoop.kms.proxyuser.hive.hosts: '*' + +ranger_log_dir: "{{ ranger_kms_log_dir }}" diff --git a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml index 4edaf529..e1910499 100644 --- a/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml +++ b/tdp_vars_defaults/tdp-cluster/tdp-cluster.yml @@ -199,9 +199,11 @@ knox_gateway_log_file: "knox-gateway_${HOSTNAME}.log" ranger_log_dir: /var/log/ranger ranger_admin_log_file: "ranger-admin_${HOSTNAME}.log" ranger_usersync_log_file: "ranger-usersync_${HOSTNAME}.log" -ranger_kms_log_file: "ranger-kms_${HOSTNAME}.log" ranger_solr_log_file: "ranger-solr_{{ ansible_fqdn }}.log" +ranger_kms_log_dir: /var/log/kms +ranger_kms_log_file: "ranger-kms_${HOSTNAME}.log" + spark2_log_dir: /var/log/spark spark2_hs_log_file: "spark-historyserver_{{ ansible_fqdn }}.log" From f6ec8219884880d9364f9c1934529ca2f8c8f2ba Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Thu, 6 Apr 2023 11:47:44 +0200 Subject: [PATCH 03/20] fix(knox): remove ranger-ui from topology --- tdp_vars_defaults/knox/knox.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/tdp_vars_defaults/knox/knox.yml b/tdp_vars_defaults/knox/knox.yml index 2d53817d..432cf323 100644 --- a/tdp_vars_defaults/knox/knox.yml +++ b/tdp_vars_defaults/knox/knox.yml @@ -141,9 +141,6 @@ gateway_topology: - "{{ groups['mapred_jhs'] | default([]) | map('tosit.tdp.access_fqdn', hostvars) | first }}" port: "{{ mapred_jhs_https_port }}" HIVE: {} - RANGERUI: - hosts: "{{ groups['ranger_admin'] | default([]) | map('tosit.tdp.access_fqdn', hostvars) | list }}" - port: "{{ ranger_adm_https_port }}" RESOURCEMANAGER: hosts: "{{ groups['yarn_rm'] | default([]) | map('tosit.tdp.access_fqdn', hostvars) | list }}" location: /ws From 935d66a8aa17dee851e377aaa147ab829392926f Mon Sep 17 00:00:00 2001 From: Henri Ky Date: Tue, 25 Apr 2023 17:35:29 +0200 Subject: [PATCH 04/20] feat(exporter_node): remove groups from topology.ini --- topology.ini | 5 ----- 1 file changed, 5 deletions(-) diff --git a/topology.ini b/topology.ini index 909ec87d..1d5c4f56 100644 --- a/topology.ini +++ b/topology.ini @@ -8,11 +8,6 @@ master worker edge -[exporter_node:children] -master -worker -edge - [zk:children] master1 master2 From e806fb1c22ea6db192fd803c29e4e8246e2c288e Mon Sep 17 00:00:00 2001 From: Paul-Adrien Cordonnier Date: Tue, 2 May 2023 17:59:00 +0200 Subject: [PATCH 05/20] feat: render HADOOP_OPTIONAL_TOOLS --- roles/hadoop/common/templates/hadoop-env.sh.j2 | 1 + tdp_vars_defaults/hadoop/hadoop.yml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/roles/hadoop/common/templates/hadoop-env.sh.j2 b/roles/hadoop/common/templates/hadoop-env.sh.j2 index 10ca8eb4..9ba5d957 100644 --- a/roles/hadoop/common/templates/hadoop-env.sh.j2 +++ b/roles/hadoop/common/templates/hadoop-env.sh.j2 @@ -158,6 +158,7 @@ esac # This is a comma delimited list. It may NOT be overridden via .hadooprc # Entries may be added/removed as needed. # export HADOOP_OPTIONAL_TOOLS="hadoop-aliyun,hadoop-aws,hadoop-azure-datalake,hadoop-azure,hadoop-kafka,hadoop-openstack" +export HADOOP_OPTIONAL_TOOLS="{{ hadoop_optional_tools | join(',') }}" ### # Options for remote shell connectivity diff --git a/tdp_vars_defaults/hadoop/hadoop.yml b/tdp_vars_defaults/hadoop/hadoop.yml index 2c7e8b46..86847ab6 100644 --- a/tdp_vars_defaults/hadoop/hadoop.yml +++ b/tdp_vars_defaults/hadoop/hadoop.yml @@ -251,3 +251,6 @@ ranger_kms_hosts: |- {{ groups['ranger_kms'] | map('tosit.tdp.access_fqdn', hostvars) | join(';') }}{% else %}NONE{% endif %} + +hadoop_optional_tools: + - hadoop-aws From 24e3727342d713981c48827bf26f71372a30c776 Mon Sep 17 00:00:00 2001 From: PACordonnier Date: Wed, 17 May 2023 10:54:34 +0200 Subject: [PATCH 06/20] fix: use console appender instead of RFA for hbase client (#758) --- tdp_vars_defaults/hbase/hbase_client.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 tdp_vars_defaults/hbase/hbase_client.yml diff --git a/tdp_vars_defaults/hbase/hbase_client.yml b/tdp_vars_defaults/hbase/hbase_client.yml new file mode 100644 index 00000000..e959a13b --- /dev/null +++ b/tdp_vars_defaults/hbase/hbase_client.yml @@ -0,0 +1,5 @@ +# Copyright 2022 TOSIT.IO +# SPDX-License-Identifier: Apache-2.0 + +--- +hbase_root_logger: console From 04bdfd92bc43c2eb2b651e73c292dc308d58369f Mon Sep 17 00:00:00 2001 From: GuillaumeHold Date: Thu, 4 May 2023 12:10:33 +0200 Subject: [PATCH 07/20] fix: update playbooks with componants client groups --- playbooks/hbase_hdfs_init.yml | 2 +- playbooks/hive_hdfs_init.yml | 2 +- playbooks/hive_kerberos_install.yml | 2 +- playbooks/knox_hdfs_init.yml | 2 +- playbooks/spark3_hdfs_init.yml | 2 +- playbooks/spark3_kerberos_install.yml | 2 +- playbooks/spark_hdfs_init.yml | 2 +- playbooks/spark_kerberos_install.yml | 2 +- playbooks/zookeeper_kerberos_install.yml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/playbooks/hbase_hdfs_init.yml b/playbooks/hbase_hdfs_init.yml index 5727253b..cabd41d6 100644 --- a/playbooks/hbase_hdfs_init.yml +++ b/playbooks/hbase_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: HBase HDFS init - hosts: edge + hosts: hbase_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/hive_hdfs_init.yml b/playbooks/hive_hdfs_init.yml index 50cda535..ad36eb0d 100644 --- a/playbooks/hive_hdfs_init.yml +++ b/playbooks/hive_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: Post install steps for Hive - hosts: edge + hosts: hive_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/hive_kerberos_install.yml b/playbooks/hive_kerberos_install.yml index d7cff99a..a1a163b8 100644 --- a/playbooks/hive_kerberos_install.yml +++ b/playbooks/hive_kerberos_install.yml @@ -25,7 +25,7 @@ tasks_from: kerberos - meta: clear_facts # noqa unnamed-task - name: Kerberos Hive Client install - hosts: edge + hosts: hive_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/knox_hdfs_init.yml b/playbooks/knox_hdfs_init.yml index 74287dc1..3c2be515 100644 --- a/playbooks/knox_hdfs_init.yml +++ b/playbooks/knox_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: Knox HDFS init - hosts: edge + hosts: knox strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/spark3_hdfs_init.yml b/playbooks/spark3_hdfs_init.yml index 9a57872e..94546573 100644 --- a/playbooks/spark3_hdfs_init.yml +++ b/playbooks/spark3_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: Post install steps for Spark3 - hosts: edge + hosts: spark3_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/spark3_kerberos_install.yml b/playbooks/spark3_kerberos_install.yml index 3b03a92b..9e9e23f1 100644 --- a/playbooks/spark3_kerberos_install.yml +++ b/playbooks/spark3_kerberos_install.yml @@ -15,7 +15,7 @@ - meta: clear_facts # noqa unnamed-task - name: Spark3 Kerberos Client install - hosts: edge + hosts: spark3_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/spark_hdfs_init.yml b/playbooks/spark_hdfs_init.yml index 150a5251..0fafead8 100644 --- a/playbooks/spark_hdfs_init.yml +++ b/playbooks/spark_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: Post install steps for Spark - Edge - hosts: edge + hosts: spark_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/spark_kerberos_install.yml b/playbooks/spark_kerberos_install.yml index e58af2c3..a5ffb3be 100644 --- a/playbooks/spark_kerberos_install.yml +++ b/playbooks/spark_kerberos_install.yml @@ -14,7 +14,7 @@ tasks_from: kerberos - meta: clear_facts # noqa unnamed-task - name: Spark Kerberos Client install - hosts: edge + hosts: spark_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/zookeeper_kerberos_install.yml b/playbooks/zookeeper_kerberos_install.yml index a5de96c9..3f5d47b8 100644 --- a/playbooks/zookeeper_kerberos_install.yml +++ b/playbooks/zookeeper_kerberos_install.yml @@ -15,7 +15,7 @@ - meta: clear_facts # noqa unnamed-task - name: Kerberos Zookeeper Client Install - hosts: edge + hosts: zk_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task From 8bedeea28f6f2817c7a8e2f9a08012ce4275539e Mon Sep 17 00:00:00 2001 From: GuillaumeHold Date: Fri, 12 May 2023 11:37:02 +0200 Subject: [PATCH 08/20] fix: correct hadoop client group in playbooks --- playbooks/hdfs_audit_init.yml | 2 +- playbooks/hdfs_check.yml | 2 +- playbooks/hdfs_kerberos_install.yml | 2 +- playbooks/spark_hdfs_init.yml | 2 +- playbooks/utils/hdfs_user_homes.yml | 2 +- playbooks/yarn_hdfs_init.yml | 2 +- playbooks/yarn_kerberos_install.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/hdfs_audit_init.yml b/playbooks/hdfs_audit_init.yml index da8b4200..6a971a67 100644 --- a/playbooks/hdfs_audit_init.yml +++ b/playbooks/hdfs_audit_init.yml @@ -3,7 +3,7 @@ --- - name: HDFS audit init - hosts: edge + hosts: hadoop_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/hdfs_check.yml b/playbooks/hdfs_check.yml index 6d36433e..2d83d91e 100644 --- a/playbooks/hdfs_check.yml +++ b/playbooks/hdfs_check.yml @@ -3,7 +3,7 @@ --- - name: HDFS service check - hosts: edge + hosts: hadoop_client environment: LC_ALL: C tasks: diff --git a/playbooks/hdfs_kerberos_install.yml b/playbooks/hdfs_kerberos_install.yml index f18695f3..5a3db49b 100644 --- a/playbooks/hdfs_kerberos_install.yml +++ b/playbooks/hdfs_kerberos_install.yml @@ -36,7 +36,7 @@ tasks_from: kerberos - meta: clear_facts # noqa unnamed-task - name: Kerberos HDFS Client install - hosts: edge + hosts: hadoop_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/spark_hdfs_init.yml b/playbooks/spark_hdfs_init.yml index 0fafead8..4d9ecb5b 100644 --- a/playbooks/spark_hdfs_init.yml +++ b/playbooks/spark_hdfs_init.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 --- -- name: Post install steps for Spark - Edge +- name: Post install steps for Spark - spark_client hosts: spark_client strategy: linear tasks: diff --git a/playbooks/utils/hdfs_user_homes.yml b/playbooks/utils/hdfs_user_homes.yml index b95832e2..57dc75ca 100644 --- a/playbooks/utils/hdfs_user_homes.yml +++ b/playbooks/utils/hdfs_user_homes.yml @@ -3,7 +3,7 @@ --- - name: HDFS configure user homes - hosts: edge + hosts: hadoop_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/yarn_hdfs_init.yml b/playbooks/yarn_hdfs_init.yml index eacfdd6e..c59dd7a2 100644 --- a/playbooks/yarn_hdfs_init.yml +++ b/playbooks/yarn_hdfs_init.yml @@ -3,7 +3,7 @@ --- - name: YARN HDFS init - hosts: edge + hosts: hadoop_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task diff --git a/playbooks/yarn_kerberos_install.yml b/playbooks/yarn_kerberos_install.yml index 31c74cbc..63d5a0bf 100644 --- a/playbooks/yarn_kerberos_install.yml +++ b/playbooks/yarn_kerberos_install.yml @@ -47,7 +47,7 @@ tasks_from: kerberos - meta: clear_facts # noqa unnamed-task - name: Kerberos Yarn Client install - hosts: edge + hosts: hadoop_client strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task From baf40c60222a6591b61ce4ff818834a890dedc79 Mon Sep 17 00:00:00 2001 From: GuillaumeHold Date: Fri, 19 May 2023 09:31:44 +0200 Subject: [PATCH 09/20] fix: revert zookeeper client kerberos install --- playbooks/zookeeper_kerberos_install.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/zookeeper_kerberos_install.yml b/playbooks/zookeeper_kerberos_install.yml index 3f5d47b8..a5de96c9 100644 --- a/playbooks/zookeeper_kerberos_install.yml +++ b/playbooks/zookeeper_kerberos_install.yml @@ -15,7 +15,7 @@ - meta: clear_facts # noqa unnamed-task - name: Kerberos Zookeeper Client Install - hosts: zk_client + hosts: edge strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task From 79068e43a74f315feada6c7c97f2f1734f63cf98 Mon Sep 17 00:00:00 2001 From: jusstol <65026036+jusstol@users.noreply.github.com> Date: Tue, 9 May 2023 15:39:38 +0200 Subject: [PATCH 10/20] fix(zk): do not apply dir permissions recursively --- roles/zookeeper/common/tasks/install.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/roles/zookeeper/common/tasks/install.yml b/roles/zookeeper/common/tasks/install.yml index b12e39ad..998493ad 100644 --- a/roles/zookeeper/common/tasks/install.yml +++ b/roles/zookeeper/common/tasks/install.yml @@ -46,7 +46,6 @@ file: path: "{{ hadoop_root_dir }}/{{ zookeeper_dist_release }}" state: directory - recurse: true group: root owner: root mode: "755" From 7312461a6e69c4d74320b1588a9c3cc00dd10d30 Mon Sep 17 00:00:00 2001 From: Paul-Adrien Cordonnier Date: Fri, 26 May 2023 15:40:44 +0200 Subject: [PATCH 11/20] feat: use TDP 1.0 release version --- tdp_vars_defaults/hadoop/hadoop.yml | 2 +- tdp_vars_defaults/hbase/hbase.yml | 12 ++++++------ tdp_vars_defaults/hdfs/hdfs.yml | 2 +- tdp_vars_defaults/hive/hive.yml | 6 +++--- tdp_vars_defaults/knox/knox.yml | 6 +++--- tdp_vars_defaults/ranger/ranger.yml | 6 +++--- tdp_vars_defaults/spark/spark.yml | 4 ++-- tdp_vars_defaults/spark3/spark3.yml | 2 +- tdp_vars_defaults/yarn/yarn.yml | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tdp_vars_defaults/hadoop/hadoop.yml b/tdp_vars_defaults/hadoop/hadoop.yml index 86847ab6..71b711e6 100644 --- a/tdp_vars_defaults/hadoop/hadoop.yml +++ b/tdp_vars_defaults/hadoop/hadoop.yml @@ -3,7 +3,7 @@ --- # Hadoop version -hadoop_release: hadoop-3.1.1-TDP-0.1.0-SNAPSHOT +hadoop_release: hadoop-3.1.1-0.0 hadoop_dist_file: "{{ hadoop_release }}.tar.gz" # Hadoop users and group diff --git a/tdp_vars_defaults/hbase/hbase.yml b/tdp_vars_defaults/hbase/hbase.yml index fa540388..93b7c036 100644 --- a/tdp_vars_defaults/hbase/hbase.yml +++ b/tdp_vars_defaults/hbase/hbase.yml @@ -3,11 +3,11 @@ --- # HBase version -hbase_release: hbase-2.1.10-TDP-0.1.0-SNAPSHOT +hbase_release: hbase-2.1.10-1.0 hbase_dist_file: "{{ hbase_release }}-bin.tar.gz" # Hbck2 version -hbase_hbck2_release: hbase-hbck2-1.1.0-TDP-0.1.0-SNAPSHOT +hbase_hbck2_release: hbase-hbck2-1.1.0-0.0 hbase_hbck2_file: "{{ hbase_hbck2_release }}.jar" # HBase users and group @@ -138,7 +138,7 @@ hbase_regionserver_kerberos_principal: "hbase/{{ ansible_fqdn }}@{{ realm }}" hbase_rest_kerberos_principal: "hbase/{{ ansible_fqdn }}@{{ realm }}" # HBase Ranger Plugin -ranger_hbase_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-hbase-plugin +ranger_hbase_release: ranger-2.0.0-1.0-hbase-plugin ranger_hbase_dist_file: "{{ ranger_hbase_release }}.tar.gz" ranger_hbase_install_dir: "{{ hbase_root_dir }}/ranger-hbase-plugin" ranger_hbase_install_properties: @@ -163,11 +163,11 @@ hbase_rest_restart: "no" phoenix_queryserver_restart: "no" # Phoenix version -phoenix_release: phoenix-hbase-2.1-5.1.3-TDP-0.1.0-SNAPSHOT-bin -phoenix_server_release: phoenix-server-hbase-2.1-5.1.3-TDP-0.1.0-SNAPSHOT +phoenix_release: phoenix-hbase-2.1-5.1.3-1.0-bin +phoenix_server_release: phoenix-server-hbase-2.1-5.1.3-1.0 phoenix_dist_file: "{{ phoenix_release }}.tar.gz" -phoenix_queryserver_release: phoenix-queryserver-6.0.0-TDP-0.1.0-SNAPSHOT +phoenix_queryserver_release: phoenix-queryserver-6.0.0-0.0 phoenix_queryserver_dist_file: "{{ phoenix_queryserver_release }}-bin.tar.gz" # Phoenix installation directory diff --git a/tdp_vars_defaults/hdfs/hdfs.yml b/tdp_vars_defaults/hdfs/hdfs.yml index 91c730bc..cc1b3cd4 100644 --- a/tdp_vars_defaults/hdfs/hdfs.yml +++ b/tdp_vars_defaults/hdfs/hdfs.yml @@ -59,7 +59,7 @@ hdfs_site: namenode_kerberos_principal: "nn/{{ ansible_fqdn }}@{{ realm }}" # Ranger HDFS properties -ranger_hdfs_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-hdfs-plugin +ranger_hdfs_release: ranger-2.0.0-1.0-hdfs-plugin ranger_hdfs_dist_file: "{{ ranger_hdfs_release }}.tar.gz" ranger_hdfs_install_dir: "{{ hadoop_root_dir }}/ranger-hdfs-plugin" ranger_hdfs_install_properties: diff --git a/tdp_vars_defaults/hive/hive.yml b/tdp_vars_defaults/hive/hive.yml index 3e4675e4..5544c44d 100644 --- a/tdp_vars_defaults/hive/hive.yml +++ b/tdp_vars_defaults/hive/hive.yml @@ -3,7 +3,7 @@ --- # Hive version -hive_release: apache-hive-3.1.3-TDP-0.1.0-SNAPSHOT-bin +hive_release: apache-hive-3.1.3-1.0-bin hive_dist_file: "{{ hive_release }}.tar.gz" # Hive users and group @@ -139,7 +139,7 @@ beeline_site: beeline.hs2.jdbc.url.default: zk_cluster # Ranger Hive properties -ranger_hive_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-hive-plugin +ranger_hive_release: ranger-2.0.0-1.0-hive-plugin ranger_hive_dist_file: "{{ ranger_hive_release }}.tar.gz" ranger_hive_install_dir: "{{ hive_root_dir }}/ranger-hive-plugin" ranger_hive_install_properties: @@ -157,7 +157,7 @@ ranger_hive_install_properties: }} # Tez properties -tez_release: tez-0.9.1-TDP-0.1.0-SNAPSHOT +tez_release: tez-0.9.1-1.0 tez_dist_file: "{{ tez_release }}.tar.gz" # Tez installation directory diff --git a/tdp_vars_defaults/knox/knox.yml b/tdp_vars_defaults/knox/knox.yml index 432cf323..52fc1634 100644 --- a/tdp_vars_defaults/knox/knox.yml +++ b/tdp_vars_defaults/knox/knox.yml @@ -3,10 +3,10 @@ --- # Knox version -knox_release: knox-1.6.1-TDP-0.1.0-SNAPSHOT +knox_release: knox-1.6.1-0.0 knox_dist_file: "{{ knox_release }}.tar.gz" -knoxshell_release: knoxshell-1.6.1-TDP-0.1.0-SNAPSHOT +knoxshell_release: knoxshell-1.6.1-0.0 knoxshell_dist_file: "{{ knoxshell_release }}.tar.gz" # Knox users and group @@ -172,7 +172,7 @@ knox_start_on_boot: no knox_restart: "no" # Ranger Knox properties -ranger_knox_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-knox-plugin +ranger_knox_release: ranger-2.0.0-1.0-knox-plugin ranger_knox_dist_file: "{{ ranger_knox_release }}.tar.gz" ranger_knox_install_dir: "{{ knox_root_dir }}/ranger-knox-plugin" ranger_knox_install_properties: diff --git a/tdp_vars_defaults/ranger/ranger.yml b/tdp_vars_defaults/ranger/ranger.yml index 4334f6ed..e5debdcf 100644 --- a/tdp_vars_defaults/ranger/ranger.yml +++ b/tdp_vars_defaults/ranger/ranger.yml @@ -3,11 +3,11 @@ --- # Ranger version -ranger_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-admin +ranger_release: ranger-2.0.0-1.0-admin ranger_dist_file: "{{ ranger_release }}.tar.gz" -ranger_usersync_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-usersync +ranger_usersync_release: ranger-2.0.0-1.0-usersync ranger_usersync_dist_file: "{{ ranger_usersync_release }}.tar.gz" -ranger_kms_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-kms +ranger_kms_release: ranger-2.0.0-1.0-kms ranger_kms_dist_file: "{{ ranger_kms_release }}.tar.gz" # Ranger users and group diff --git a/tdp_vars_defaults/spark/spark.yml b/tdp_vars_defaults/spark/spark.yml index eca9a2d9..c0ddd0de 100644 --- a/tdp_vars_defaults/spark/spark.yml +++ b/tdp_vars_defaults/spark/spark.yml @@ -4,9 +4,9 @@ --- # Spark version spark_version: spark -spark_release: spark-2.3.5-TDP-0.1.0-SNAPSHOT-bin-tdp +spark_release: spark-2.3.4-1.0-bin-tdp spark_dist_file: "{{ spark_release }}.tgz" -spark_hbase_dist_file: hbase-spark-2.3.5-1.0.0-TDP-0.1.0-SNAPSHOT.jar +spark_hbase_dist_file: hbase-spark-2.3.4-1.0.0-0.0.jar # Spark HBase Connector spark_hbase_connector_enable: true diff --git a/tdp_vars_defaults/spark3/spark3.yml b/tdp_vars_defaults/spark3/spark3.yml index 62949db1..fc293839 100644 --- a/tdp_vars_defaults/spark3/spark3.yml +++ b/tdp_vars_defaults/spark3/spark3.yml @@ -4,7 +4,7 @@ --- # Spark version spark_version: spark3 -spark_release: spark-3.2.2-TDP-0.1.0-SNAPSHOT-bin-tdp +spark_release: spark-3.2.2-0.0-bin-tdp spark_dist_file: "{{ spark_release }}.tgz" # Spark HBase Connector diff --git a/tdp_vars_defaults/yarn/yarn.yml b/tdp_vars_defaults/yarn/yarn.yml index 42ee6963..5e913f84 100644 --- a/tdp_vars_defaults/yarn/yarn.yml +++ b/tdp_vars_defaults/yarn/yarn.yml @@ -145,7 +145,7 @@ container_executor: # Ranger YARN properties -ranger_yarn_release: ranger-2.0.1-TDP-0.1.0-SNAPSHOT-yarn-plugin +ranger_yarn_release: ranger-2.0.0-1.0-yarn-plugin ranger_yarn_dist_file: "{{ ranger_yarn_release }}.tar.gz" ranger_yarn_install_dir: "{{ hadoop_root_dir }}/ranger-yarn-plugin" ranger_yarn_install_properties: From 6ea75a79306cc9fff7e950b982af523ab66ec246 Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Tue, 20 Jun 2023 15:49:05 +0200 Subject: [PATCH 12/20] fix(knox): enable apps' kill from yarn-ui --- .../knox/common/templates/services/yarnui/2.7.0/rewrite.xml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/knox/common/templates/services/yarnui/2.7.0/rewrite.xml.j2 b/roles/knox/common/templates/services/yarnui/2.7.0/rewrite.xml.j2 index e6aaf346..f0a90138 100644 --- a/roles/knox/common/templates/services/yarnui/2.7.0/rewrite.xml.j2 +++ b/roles/knox/common/templates/services/yarnui/2.7.0/rewrite.xml.j2 @@ -210,7 +210,7 @@ - + From 873c620325df9d8792643ae40e2fc9861f7cc7cd Mon Sep 17 00:00:00 2001 From: Paul-Adrien Cordonnier Date: Fri, 30 Jun 2023 11:22:03 +0200 Subject: [PATCH 13/20] fix: remove hardcoded JAVA_HOME --- roles/hbase/ranger/tasks/config.yml | 2 +- roles/hdfs/ranger/tasks/config.yml | 2 +- roles/hive/ranger/tasks/config.yml | 2 +- roles/knox/ranger/tasks/config.yml | 2 +- roles/ranger/admin/tasks/config.yml | 2 +- roles/ranger/kms/tasks/config.yml | 2 +- roles/ranger/usersync/tasks/config.yml | 2 +- roles/yarn/ranger/tasks/config.yml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/roles/hbase/ranger/tasks/config.yml b/roles/hbase/ranger/tasks/config.yml index 548de35c..7aa8a16a 100644 --- a/roles/hbase/ranger/tasks/config.yml +++ b/roles/hbase/ranger/tasks/config.yml @@ -26,7 +26,7 @@ - name: Run enable-hbase-plugin.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./enable-hbase-plugin.sh args: chdir: "{{ ranger_hbase_install_dir }}" diff --git a/roles/hdfs/ranger/tasks/config.yml b/roles/hdfs/ranger/tasks/config.yml index c70ef934..920cec84 100644 --- a/roles/hdfs/ranger/tasks/config.yml +++ b/roles/hdfs/ranger/tasks/config.yml @@ -35,7 +35,7 @@ - name: Run enable-hdfs-plugin.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./enable-hdfs-plugin.sh args: chdir: "{{ ranger_hdfs_install_dir }}" diff --git a/roles/hive/ranger/tasks/config.yml b/roles/hive/ranger/tasks/config.yml index 06fe4d2d..e601f6c2 100644 --- a/roles/hive/ranger/tasks/config.yml +++ b/roles/hive/ranger/tasks/config.yml @@ -35,7 +35,7 @@ - name: Run enable-hive-plugin.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./enable-hive-plugin.sh args: chdir: "{{ ranger_hive_install_dir }}" diff --git a/roles/knox/ranger/tasks/config.yml b/roles/knox/ranger/tasks/config.yml index 62e7590a..f4f6fc11 100644 --- a/roles/knox/ranger/tasks/config.yml +++ b/roles/knox/ranger/tasks/config.yml @@ -36,7 +36,7 @@ - name: Run enable-knox-plugin.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./enable-knox-plugin.sh args: chdir: "{{ ranger_knox_install_dir }}" diff --git a/roles/ranger/admin/tasks/config.yml b/roles/ranger/admin/tasks/config.yml index f9321d32..19e9c26b 100644 --- a/roles/ranger/admin/tasks/config.yml +++ b/roles/ranger/admin/tasks/config.yml @@ -12,7 +12,7 @@ - name: Run setup.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./setup.sh args: chdir: "{{ ranger_install_dir }}" diff --git a/roles/ranger/kms/tasks/config.yml b/roles/ranger/kms/tasks/config.yml index 89f3c44f..6a2e6e1d 100644 --- a/roles/ranger/kms/tasks/config.yml +++ b/roles/ranger/kms/tasks/config.yml @@ -12,7 +12,7 @@ - name: Run setup.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./setup.sh args: chdir: "{{ ranger_kms_install_dir }}" diff --git a/roles/ranger/usersync/tasks/config.yml b/roles/ranger/usersync/tasks/config.yml index 8cbd941b..338559cd 100644 --- a/roles/ranger/usersync/tasks/config.yml +++ b/roles/ranger/usersync/tasks/config.yml @@ -12,7 +12,7 @@ - name: Setup usersync shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} export PATH="${JAVA_HOME}/bin:${PATH}" {{ python_interpreter }} ./setup.py args: diff --git a/roles/yarn/ranger/tasks/config.yml b/roles/yarn/ranger/tasks/config.yml index 8ebed194..8a9a0819 100644 --- a/roles/yarn/ranger/tasks/config.yml +++ b/roles/yarn/ranger/tasks/config.yml @@ -36,7 +36,7 @@ - name: Run enable-yarn-plugin.sh shell: | - export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk + export JAVA_HOME={{ java_home }} ./enable-yarn-plugin.sh args: chdir: "{{ ranger_yarn_install_dir }}" From 1e3400695604a39ec47c6c2b45bad52159a659a3 Mon Sep 17 00:00:00 2001 From: Paul-Adrien Cordonnier Date: Fri, 28 Jul 2023 12:41:11 +0200 Subject: [PATCH 14/20] 768 some opttdp path are not variabilize (#769) * fix: remove hardcoded /opt/tdp * feat: use default hadoop_root_dir for JCEKS task Auto stash before rebase of "refs/heads/768-some-opttdp-path-are-not-variabilize" * fix: remove hardcoded /opt/tdp * fix: remove hardcode /opt/tdp in comments * fix: use tez_install_dir in hive-env * fix: remove hardcoded /opt/tdp * fix: remove whitespace --- roles/hbase/ranger/tasks/config.yml | 2 +- roles/hdfs/namenode/tasks/start_standby_nn.yml | 2 +- roles/hive/common/tasks/hdfs_init.yml | 2 +- roles/hive/common/templates/hive-env.sh.j2 | 2 +- roles/hive/ranger/tasks/config.yml | 2 +- roles/knox/ranger/tasks/config.yml | 2 +- roles/knox/ranger/tasks/init.yml | 2 +- roles/utils/jceks/defaults/main.yml | 1 - roles/utils/jceks/tasks/local.yml | 2 +- 9 files changed, 8 insertions(+), 9 deletions(-) diff --git a/roles/hbase/ranger/tasks/config.yml b/roles/hbase/ranger/tasks/config.yml index 7aa8a16a..223942d3 100644 --- a/roles/hbase/ranger/tasks/config.yml +++ b/roles/hbase/ranger/tasks/config.yml @@ -10,7 +10,7 @@ group: root mode: "644" -# enable-hbase-plugin.sh will only modify configuration files in /opt/tdp/hbase/conf +# enable-hbase-plugin.sh will only modify configuration files in {{ hbase_root_dir }}/conf # There is no way to tell the script to use /etc/hbase/conf.master or /etc/hbase/conf.rs # So we create a symbolic link in installation /opt/hbase/ that points to actual conf - name: Backup {{ hbase_install_dir }}/conf diff --git a/roles/hdfs/namenode/tasks/start_standby_nn.yml b/roles/hdfs/namenode/tasks/start_standby_nn.yml index 43ea582a..a490d114 100644 --- a/roles/hdfs/namenode/tasks/start_standby_nn.yml +++ b/roles/hdfs/namenode/tasks/start_standby_nn.yml @@ -5,7 +5,7 @@ - name: Bootstrap standby namenode become: true become_user: "{{ hdfs_user }}" - command: "/opt/tdp/hadoop/bin/hdfs --config /etc/hadoop/conf.nn namenode -bootstrapStandby -nonInteractive" + command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config /etc/hadoop/conf.nn namenode -bootstrapStandby -nonInteractive" args: creates: "{{ hdfs_site['dfs.namenode.name.dir'] }}/current" diff --git a/roles/hive/common/tasks/hdfs_init.yml b/roles/hive/common/tasks/hdfs_init.yml index 88d8ec5d..b5a548ea 100644 --- a/roles/hive/common/tasks/hdfs_init.yml +++ b/roles/hive/common/tasks/hdfs_init.yml @@ -63,7 +63,7 @@ - name: Put tez release to hdfs run_once: true - command: "/opt/tdp/hadoop/bin/hdfs --config {{ hadoop_conf_dir }} dfs -put {{ binaries_upload_dir }}/{{ tez_dist_file }} /tdp/tez" + command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_conf_dir }} dfs -put {{ binaries_upload_dir }}/{{ tez_dist_file }} /tdp/tez" become: true become_user: hdfs register: hdfs_put_tez diff --git a/roles/hive/common/templates/hive-env.sh.j2 b/roles/hive/common/templates/hive-env.sh.j2 index 5db9ce64..8534b568 100644 --- a/roles/hive/common/templates/hive-env.sh.j2 +++ b/roles/hive/common/templates/hive-env.sh.j2 @@ -45,7 +45,7 @@ export HADOOP_HOME={{ hadoop_home }} export JAVA_HOME={{ java_home }} -export AUX_CLASSPATH="/opt/tdp/tez/*:/opt/tdp/tez/lib/*" +export AUX_CLASSPATH="{{ tez_install_dir }}/*:{{ tez_install_dir }}/lib/*" export HADOOP_HEAPSIZE="{{ hive_default_heapsize }}" diff --git a/roles/hive/ranger/tasks/config.yml b/roles/hive/ranger/tasks/config.yml index e601f6c2..46536389 100644 --- a/roles/hive/ranger/tasks/config.yml +++ b/roles/hive/ranger/tasks/config.yml @@ -11,7 +11,7 @@ mode: "644" # Ranger installation scripts finds hive at "../hive" to add necessary properties to hive-site.xml, generate the ranger-*.xml -# It can also be configured with COMPONENT_INSTALL_DIR_NAME but we still have to make /opt/tdp/hive/conf a symbolic link to /etc/hive/conf.s2 to get the configurations at the right place +# It can also be configured with COMPONENT_INSTALL_DIR_NAME but we still have to make {{ hive_install_dir ]]/conf a symbolic link to /etc/hive/conf.s2 to get the configurations at the right place # TODO: find a better way to do this - name: Backup {{ hive_install_dir }}/conf diff --git a/roles/knox/ranger/tasks/config.yml b/roles/knox/ranger/tasks/config.yml index f4f6fc11..445c01e1 100644 --- a/roles/knox/ranger/tasks/config.yml +++ b/roles/knox/ranger/tasks/config.yml @@ -11,7 +11,7 @@ mode: "644" # Ranger installation scripts finds knox at "../knox" to add necessary properties to knox-site.xml, generate the ranger-*.xml -# It can also be configured with COMPONENT_INSTALL_DIR_NAME but we still have to make /opt/tdp/knox/conf +# It can also be configured with COMPONENT_INSTALL_DIR_NAME but we still have to make {{ knox_install_dir }}/conf # a symbolic link to /etc/knox/conf.knox to get the configurations at the right place # TODO: find a better way to do this diff --git a/roles/knox/ranger/tasks/init.yml b/roles/knox/ranger/tasks/init.yml index cece49cc..4a819db1 100644 --- a/roles/knox/ranger/tasks/init.yml +++ b/roles/knox/ranger/tasks/init.yml @@ -44,5 +44,5 @@ #TODO Fix it in the build instead - name: Quickfix of missing jars for ranger plugin - shell: "ln -s /opt/tdp/hadoop/share/hadoop/hdfs/hadoop-hdfs-* /opt/tdp/ranger-knox-plugin/lib/ranger-knox-plugin-impl/" + shell: "ln -s {{ hadoop_root_dir }}/hadoop/share/hadoop/hdfs/hadoop-hdfs-* {{ ranger_knox_install_dir }}/lib/ranger-knox-plugin-impl/" ignore_errors: true diff --git a/roles/utils/jceks/defaults/main.yml b/roles/utils/jceks/defaults/main.yml index af7a869e..82bffc2d 100644 --- a/roles/utils/jceks/defaults/main.yml +++ b/roles/utils/jceks/defaults/main.yml @@ -2,5 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -hadoop_home: "/opt/tdp/hadoop" hadoop_credstore_password: "none" diff --git a/roles/utils/jceks/tasks/local.yml b/roles/utils/jceks/tasks/local.yml index d068ede3..2151b6e3 100644 --- a/roles/utils/jceks/tasks/local.yml +++ b/roles/utils/jceks/tasks/local.yml @@ -9,7 +9,7 @@ - name: "Create JCEKS file {{ jceks_file }}" command: >- - {{ hadoop_home }}/bin/hadoop credential + {{ hadoop_install_dir }}/bin/hadoop credential create {{ item.property }} -value '{{ item.value }}' -provider localjceks://file{{ jceks_file }} From d93568ccada54a00de4639972b489b68d5874989 Mon Sep 17 00:00:00 2001 From: Mohamed Mehdi BEN AISSA Date: Wed, 26 Jul 2023 11:29:53 +0200 Subject: [PATCH 15/20] feat(knox): livy integration with HA mode --- tdp_vars_defaults/knox/knox.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tdp_vars_defaults/knox/knox.yml b/tdp_vars_defaults/knox/knox.yml index 52fc1634..1d775904 100644 --- a/tdp_vars_defaults/knox/knox.yml +++ b/tdp_vars_defaults/knox/knox.yml @@ -125,6 +125,7 @@ gateway_topology: HBASEUI: "{{ topology_common_ha_configuration }}" HDFSUI: "{{ topology_common_ha_configuration }}" NAMENODE: "{{ topology_common_ha_configuration }}" + LIVYSERVER: "{{ topology_common_ha_configuration }}" identity-assertion: name: Default services: @@ -164,6 +165,9 @@ gateway_topology: HBASEUI: hosts: "{{ groups['hbase_master'] | default([]) | map('tosit.tdp.access_fqdn', hostvars) | list }}" port: "{{ hbase_master_info_port }}" + LIVYSERVER: + hosts: "{% if groups['livy_spark3_server'] is defined %}{{ groups['livy_spark3_server'] | default([]) | map('tosit.tdp.access_fqdn', hostvars) | list }}{% else %}{% endif %}" + port: "8999" # Service start on boot policies knox_start_on_boot: no From 9fec0768b5acc50b75d7e9bf296cc1610e2e000b Mon Sep 17 00:00:00 2001 From: Romain Pignolet Date: Sun, 9 Jul 2023 19:00:20 +0200 Subject: [PATCH 16/20] refactor: migrate to ansible-core-2.15 - use ansible module full name - remove "warn" for "command" module which is not needed now - refactor "label" inside "loop_control" to use string type - use shebang "#!/usr/bin/python" for module as written in the doc - remove plugin shebang when it does not contains a "main" function --- README.md | 6 +- playbooks/exporter_jmx_install.yml | 4 +- playbooks/hadoop_client_config.yml | 4 +- playbooks/hadoop_client_install.yml | 4 +- playbooks/hbase_client_config.yml | 4 +- playbooks/hbase_client_install.yml | 4 +- playbooks/hbase_hdfs_init.yml | 4 +- playbooks/hbase_jmx-exporter_config.yml | 16 +- playbooks/hbase_kerberos_install.yml | 16 +- playbooks/hbase_master_config.yml | 4 +- playbooks/hbase_master_install.yml | 4 +- playbooks/hbase_master_restart.yml | 4 +- playbooks/hbase_master_start.yml | 4 +- playbooks/hbase_master_status.yml | 4 +- playbooks/hbase_master_stop.yml | 4 +- playbooks/hbase_phoenix_client_install.yml | 4 +- .../hbase_phoenix_coprocessor_install.yml | 4 +- playbooks/hbase_phoenix_kerberos_install.yml | 4 +- ...base_phoenix_queryserver_client_config.yml | 4 +- ...ase_phoenix_queryserver_client_install.yml | 4 +- ...base_phoenix_queryserver_daemon_config.yml | 4 +- ...ase_phoenix_queryserver_daemon_install.yml | 4 +- ...ase_phoenix_queryserver_daemon_restart.yml | 4 +- ...hbase_phoenix_queryserver_daemon_start.yml | 4 +- ...base_phoenix_queryserver_daemon_status.yml | 4 +- .../hbase_phoenix_queryserver_daemon_stop.yml | 4 +- playbooks/hbase_phoenix_ranger_init.yml | 4 +- playbooks/hbase_phoenix_ssl-tls_install.yml | 4 +- playbooks/hbase_ranger_config.yml | 4 +- playbooks/hbase_ranger_init.yml | 4 +- playbooks/hbase_ranger_install.yml | 4 +- playbooks/hbase_regionserver_config.yml | 4 +- playbooks/hbase_regionserver_install.yml | 4 +- playbooks/hbase_regionserver_restart.yml | 4 +- playbooks/hbase_regionserver_start.yml | 4 +- playbooks/hbase_regionserver_status.yml | 4 +- playbooks/hbase_regionserver_stop.yml | 4 +- playbooks/hbase_rest_config.yml | 4 +- playbooks/hbase_rest_install.yml | 4 +- playbooks/hbase_rest_restart.yml | 4 +- playbooks/hbase_rest_start.yml | 4 +- playbooks/hbase_rest_status.yml | 4 +- playbooks/hbase_rest_stop.yml | 4 +- playbooks/hbase_ssl-tls_install.yml | 12 +- playbooks/hdfs_audit_init.yml | 4 +- playbooks/hdfs_check.yml | 4 +- playbooks/hdfs_client_config.yml | 4 +- playbooks/hdfs_client_install.yml | 4 +- playbooks/hdfs_datanode_check.yml | 4 +- playbooks/hdfs_datanode_config.yml | 4 +- playbooks/hdfs_datanode_install.yml | 4 +- playbooks/hdfs_datanode_restart.yml | 4 +- playbooks/hdfs_datanode_start.yml | 4 +- playbooks/hdfs_datanode_status.yml | 4 +- playbooks/hdfs_datanode_stop.yml | 4 +- playbooks/hdfs_httpfs_config.yml | 4 +- playbooks/hdfs_httpfs_install.yml | 4 +- playbooks/hdfs_httpfs_restart.yml | 4 +- playbooks/hdfs_httpfs_start.yml | 4 +- playbooks/hdfs_httpfs_status.yml | 4 +- playbooks/hdfs_httpfs_stop.yml | 4 +- playbooks/hdfs_jmx-exporter_config.yml | 16 +- playbooks/hdfs_journalnode_check.yml | 4 +- playbooks/hdfs_journalnode_config.yml | 4 +- playbooks/hdfs_journalnode_install.yml | 4 +- playbooks/hdfs_journalnode_restart.yml | 4 +- playbooks/hdfs_journalnode_start.yml | 4 +- playbooks/hdfs_journalnode_status.yml | 4 +- playbooks/hdfs_journalnode_stop.yml | 4 +- playbooks/hdfs_kerberos_install.yml | 20 +- playbooks/hdfs_namenode_check.yml | 4 +- playbooks/hdfs_namenode_config.yml | 4 +- playbooks/hdfs_namenode_formatzk.yml | 4 +- playbooks/hdfs_namenode_install.yml | 4 +- playbooks/hdfs_namenode_restart.yml | 4 +- playbooks/hdfs_namenode_start.yml | 8 +- playbooks/hdfs_namenode_status.yml | 4 +- playbooks/hdfs_namenode_stop.yml | 4 +- playbooks/hdfs_ranger_check.yml | 4 +- playbooks/hdfs_ranger_config.yml | 8 +- playbooks/hdfs_ranger_init.yml | 4 +- playbooks/hdfs_ranger_install.yml | 4 +- playbooks/hdfs_ssl-tls_install.yml | 20 +- playbooks/hive_client_config.yml | 4 +- playbooks/hive_client_install.yml | 4 +- playbooks/hive_hdfs_init.yml | 4 +- playbooks/hive_hiveserver2_config.yml | 4 +- playbooks/hive_hiveserver2_install.yml | 4 +- playbooks/hive_hiveserver2_restart.yml | 4 +- playbooks/hive_hiveserver2_start.yml | 4 +- playbooks/hive_hiveserver2_status.yml | 4 +- playbooks/hive_hiveserver2_stop.yml | 4 +- playbooks/hive_init_schema.yml | 4 +- playbooks/hive_install.yml | 4 +- playbooks/hive_jmx-exporter_config.yml | 8 +- playbooks/hive_kerberos_install.yml | 12 +- playbooks/hive_metastore_config.yml | 4 +- playbooks/hive_metastore_install.yml | 4 +- playbooks/hive_metastore_restart.yml | 4 +- playbooks/hive_metastore_start.yml | 4 +- playbooks/hive_metastore_status.yml | 4 +- playbooks/hive_metastore_stop.yml | 4 +- playbooks/hive_ranger_config.yml | 4 +- playbooks/hive_ranger_init.yml | 4 +- playbooks/hive_ranger_install.yml | 4 +- playbooks/hive_ssl-tls_install.yml | 8 +- playbooks/knox_gateway_config.yml | 4 +- playbooks/knox_gateway_install.yml | 4 +- playbooks/knox_gateway_restart.yml | 4 +- playbooks/knox_gateway_start.yml | 4 +- playbooks/knox_gateway_status.yml | 4 +- playbooks/knox_gateway_stop.yml | 4 +- playbooks/knox_hdfs_init.yml | 4 +- playbooks/knox_jmx-exporter_config.yml | 4 +- playbooks/knox_kerberos_install.yml | 4 +- playbooks/knox_ranger_config.yml | 4 +- playbooks/knox_ranger_init.yml | 4 +- playbooks/knox_ranger_install.yml | 4 +- playbooks/knox_ssl-tls_install.yml | 4 +- playbooks/meta/all.yml | 284 +++++++++--------- playbooks/meta/all_per_service.yml | 22 +- playbooks/meta/exporter.yml | 2 +- playbooks/meta/hadoop.yml | 4 +- playbooks/meta/hbase.yml | 56 ++-- playbooks/meta/hdfs.yml | 44 +-- playbooks/meta/hive.yml | 34 +-- playbooks/meta/knox.yml | 20 +- playbooks/meta/ranger.yml | 32 +- playbooks/meta/spark.yml | 18 +- playbooks/meta/spark3.yml | 18 +- playbooks/meta/yarn.yml | 42 +-- playbooks/meta/zookeeper.yml | 14 +- playbooks/ranger_admin_config.yml | 4 +- playbooks/ranger_admin_install.yml | 4 +- playbooks/ranger_admin_restart.yml | 4 +- playbooks/ranger_admin_start.yml | 4 +- playbooks/ranger_admin_status.yml | 4 +- playbooks/ranger_admin_stop.yml | 4 +- playbooks/ranger_jmx-exporter_config.yml | 12 +- playbooks/ranger_kerberos_install.yml | 12 +- playbooks/ranger_kms_config.yml | 4 +- playbooks/ranger_kms_init.yml | 4 +- playbooks/ranger_kms_install.yml | 4 +- playbooks/ranger_kms_restart.yml | 4 +- playbooks/ranger_kms_ssl-tls.yml | 4 +- playbooks/ranger_kms_start.yml | 4 +- playbooks/ranger_kms_status.yml | 4 +- playbooks/ranger_kms_stop.yml | 4 +- playbooks/ranger_solr_init.yml | 4 +- playbooks/ranger_solr_install.yml | 4 +- playbooks/ranger_solr_restart.yml | 4 +- playbooks/ranger_solr_start.yml | 4 +- playbooks/ranger_solr_status.yml | 4 +- playbooks/ranger_solr_stop.yml | 4 +- playbooks/ranger_ssl-tls_install.yml | 10 +- playbooks/ranger_usersync_config.yml | 4 +- playbooks/ranger_usersync_install.yml | 4 +- playbooks/ranger_usersync_restart.yml | 4 +- playbooks/ranger_usersync_start.yml | 4 +- playbooks/ranger_usersync_status.yml | 4 +- playbooks/ranger_usersync_stop.yml | 4 +- playbooks/restart_all.yml | 18 +- playbooks/restart_hbase.yml | 8 +- playbooks/restart_hdfs.yml | 6 +- playbooks/restart_hive.yml | 4 +- playbooks/restart_knox.yml | 2 +- playbooks/restart_ranger.yml | 4 +- playbooks/restart_spark.yml | 2 +- playbooks/restart_spark3.yml | 2 +- playbooks/restart_yarn.yml | 8 +- playbooks/restart_zookeeper.yml | 2 +- playbooks/spark3_client_config.yml | 4 +- playbooks/spark3_client_install.yml | 4 +- playbooks/spark3_hdfs_init.yml | 8 +- playbooks/spark3_historyserver_config.yml | 4 +- playbooks/spark3_historyserver_install.yml | 4 +- playbooks/spark3_historyserver_restart.yml | 4 +- playbooks/spark3_historyserver_start.yml | 4 +- playbooks/spark3_historyserver_status.yml | 4 +- playbooks/spark3_historyserver_stop.yml | 4 +- playbooks/spark3_jmx-exporter_config.yml | 4 +- playbooks/spark3_kerberos_install.yml | 8 +- playbooks/spark3_ssl-tls_install.yml | 4 +- playbooks/spark_client_config.yml | 4 +- playbooks/spark_client_install.yml | 4 +- playbooks/spark_hdfs_init.yml | 8 +- playbooks/spark_historyserver_config.yml | 4 +- playbooks/spark_historyserver_install.yml | 4 +- playbooks/spark_historyserver_restart.yml | 4 +- playbooks/spark_historyserver_start.yml | 4 +- playbooks/spark_historyserver_status.yml | 4 +- playbooks/spark_historyserver_stop.yml | 4 +- playbooks/spark_jmx-exporter_config.yml | 4 +- playbooks/spark_kerberos_install.yml | 8 +- playbooks/spark_ssl-tls_install.yml | 4 +- playbooks/tests/test_user_group.yml | 22 +- playbooks/utils/hdfs_user_homes.yml | 4 +- playbooks/utils/ranger_policies.yml | 4 +- playbooks/yarn_apptimelineserver_config.yml | 4 +- playbooks/yarn_apptimelineserver_install.yml | 4 +- playbooks/yarn_apptimelineserver_restart.yml | 4 +- playbooks/yarn_apptimelineserver_start.yml | 4 +- playbooks/yarn_apptimelineserver_status.yml | 4 +- playbooks/yarn_apptimelineserver_stop.yml | 4 +- playbooks/yarn_client_config.yml | 4 +- playbooks/yarn_client_install.yml | 4 +- playbooks/yarn_hdfs_init.yml | 4 +- playbooks/yarn_jmx-exporter_config.yml | 16 +- playbooks/yarn_kerberos_install.yml | 20 +- .../yarn_mapred_jobhistoryserver_config.yml | 4 +- .../yarn_mapred_jobhistoryserver_install.yml | 4 +- .../yarn_mapred_jobhistoryserver_restart.yml | 4 +- .../yarn_mapred_jobhistoryserver_start.yml | 4 +- .../yarn_mapred_jobhistoryserver_status.yml | 4 +- .../yarn_mapred_jobhistoryserver_stop.yml | 4 +- playbooks/yarn_nodemanager_config.yml | 4 +- playbooks/yarn_nodemanager_install.yml | 4 +- playbooks/yarn_nodemanager_restart.yml | 4 +- playbooks/yarn_nodemanager_start.yml | 4 +- playbooks/yarn_nodemanager_status.yml | 4 +- playbooks/yarn_nodemanager_stop.yml | 4 +- playbooks/yarn_ranger_config.yml | 4 +- playbooks/yarn_ranger_init.yml | 4 +- playbooks/yarn_ranger_install.yml | 4 +- ...yarn_resourcemanager_capacityscheduler.yml | 4 +- playbooks/yarn_resourcemanager_config.yml | 4 +- playbooks/yarn_resourcemanager_install.yml | 4 +- playbooks/yarn_resourcemanager_restart.yml | 4 +- playbooks/yarn_resourcemanager_start.yml | 4 +- playbooks/yarn_resourcemanager_status.yml | 4 +- playbooks/yarn_resourcemanager_stop.yml | 4 +- playbooks/yarn_ssl-tls_install.yml | 20 +- playbooks/zookeeper_check.yml | 4 +- playbooks/zookeeper_client_config.yml | 4 +- playbooks/zookeeper_client_install.yml | 4 +- playbooks/zookeeper_jmx-exporter_config.yml | 4 +- playbooks/zookeeper_kerberos_install.yml | 8 +- playbooks/zookeeper_server_check.yml | 4 +- playbooks/zookeeper_server_config.yml | 4 +- playbooks/zookeeper_server_install.yml | 4 +- playbooks/zookeeper_server_restart.yml | 4 +- playbooks/zookeeper_server_start.yml | 4 +- playbooks/zookeeper_server_status.yml | 4 +- playbooks/zookeeper_server_stop.yml | 4 +- plugins/filter/access_fqdn.py | 1 - plugins/module_utils/kerberos.py | 1 - plugins/module_utils/kerberos_admin.py | 1 - plugins/modules/hdfs_file.py | 2 +- plugins/modules/krb_keytab.py | 2 +- plugins/modules/krb_principal.py | 2 +- plugins/modules/ranger_policy.py | 2 +- roles/common/handlers/main.yml | 2 +- roles/exporter/jmx/tasks/install.yml | 6 +- roles/hadoop/client/tasks/config.yml | 14 +- roles/hadoop/client/tasks/install.yml | 10 +- roles/hadoop/client/tasks/kerberos.yml | 6 +- roles/hadoop/client/tasks/ssl-tls.yml | 4 +- roles/hadoop/common/tasks/install.yml | 18 +- roles/hadoop/common/tasks/kerberos.yml | 20 +- roles/hbase/client/tasks/config.yml | 10 +- roles/hbase/client/tasks/install.yml | 8 +- roles/hbase/client/tasks/kerberos.yml | 8 +- roles/hbase/common/tasks/install_hbase.yml | 18 +- roles/hbase/common/tasks/install_phoenix.yml | 8 +- roles/hbase/master/tasks/config.yml | 14 +- roles/hbase/master/tasks/install.yml | 6 +- roles/hbase/master/tasks/jmx-exporter.yml | 4 +- roles/hbase/master/tasks/kerberos.yml | 10 +- roles/hbase/master/tasks/restart.yml | 2 +- roles/hbase/master/tasks/ssl-tls.yml | 8 +- roles/hbase/master/tasks/start.yml | 2 +- roles/hbase/master/tasks/status.yml | 4 +- roles/hbase/master/tasks/stop.yml | 2 +- roles/hbase/phoenix/client/tasks/install.yml | 6 +- .../phoenix/coprocessor/tasks/install.yml | 10 +- .../tasks/ranger_phoenix_policy.yml | 2 +- .../queryserver/client/tasks/config.yml | 10 +- .../queryserver/client/tasks/install.yml | 8 +- .../queryserver/common/tasks/install.yml | 10 +- .../queryserver/daemon/tasks/config.yml | 12 +- .../queryserver/daemon/tasks/install.yml | 10 +- .../queryserver/daemon/tasks/jmx-exporter.yml | 4 +- .../queryserver/daemon/tasks/kerberos.yml | 10 +- .../queryserver/daemon/tasks/restart.yml | 2 +- .../queryserver/daemon/tasks/ssl-tls.yml | 6 +- .../queryserver/daemon/tasks/start.yml | 2 +- .../queryserver/daemon/tasks/status.yml | 4 +- .../phoenix/queryserver/daemon/tasks/stop.yml | 2 +- roles/hbase/ranger/tasks/config.yml | 8 +- roles/hbase/ranger/tasks/init.yml | 2 +- roles/hbase/ranger/tasks/install.yml | 8 +- roles/hbase/regionserver/tasks/config.yml | 14 +- roles/hbase/regionserver/tasks/install.yml | 6 +- .../hbase/regionserver/tasks/jmx-exporter.yml | 4 +- roles/hbase/regionserver/tasks/kerberos.yml | 10 +- roles/hbase/regionserver/tasks/restart.yml | 2 +- roles/hbase/regionserver/tasks/ssl-tls.yml | 8 +- roles/hbase/regionserver/tasks/start.yml | 2 +- roles/hbase/regionserver/tasks/status.yml | 4 +- roles/hbase/regionserver/tasks/stop.yml | 2 +- roles/hbase/rest/tasks/config.yml | 14 +- roles/hbase/rest/tasks/install.yml | 6 +- roles/hbase/rest/tasks/jmx-exporter.yml | 4 +- roles/hbase/rest/tasks/kerberos.yml | 14 +- roles/hbase/rest/tasks/restart.yml | 2 +- roles/hbase/rest/tasks/ssl-tls.yml | 6 +- roles/hbase/rest/tasks/start.yml | 2 +- roles/hbase/rest/tasks/status.yml | 4 +- roles/hbase/rest/tasks/stop.yml | 2 +- roles/hdfs/check/tasks/main.yml | 32 +- roles/hdfs/client/tasks/config.yml | 2 +- roles/hdfs/client/tasks/install.yml | 4 +- roles/hdfs/client/tasks/kerberos.yml | 6 +- roles/hdfs/common/tasks/install.yml | 10 +- roles/hdfs/datanode/tasks/check.yml | 6 +- roles/hdfs/datanode/tasks/config.yml | 12 +- roles/hdfs/datanode/tasks/install.yml | 10 +- roles/hdfs/datanode/tasks/jmx-exporter.yml | 4 +- roles/hdfs/datanode/tasks/kerberos.yml | 12 +- roles/hdfs/datanode/tasks/restart.yml | 2 +- roles/hdfs/datanode/tasks/ssl-tls.yml | 10 +- roles/hdfs/datanode/tasks/start.yml | 2 +- roles/hdfs/datanode/tasks/status.yml | 4 +- roles/hdfs/datanode/tasks/stop.yml | 2 +- roles/hdfs/httpfs/tasks/config.yml | 16 +- roles/hdfs/httpfs/tasks/install.yml | 8 +- roles/hdfs/httpfs/tasks/jmx-exporter.yml | 4 +- roles/hdfs/httpfs/tasks/kerberos.yml | 12 +- roles/hdfs/httpfs/tasks/restart.yml | 2 +- roles/hdfs/httpfs/tasks/ssl-tls.yml | 8 +- roles/hdfs/httpfs/tasks/start.yml | 2 +- roles/hdfs/httpfs/tasks/status.yml | 4 +- roles/hdfs/httpfs/tasks/stop.yml | 2 +- roles/hdfs/journalnode/tasks/check.yml | 6 +- roles/hdfs/journalnode/tasks/config.yml | 12 +- roles/hdfs/journalnode/tasks/install.yml | 8 +- roles/hdfs/journalnode/tasks/jmx-exporter.yml | 4 +- roles/hdfs/journalnode/tasks/kerberos.yml | 10 +- roles/hdfs/journalnode/tasks/restart.yml | 2 +- roles/hdfs/journalnode/tasks/ssl-tls.yml | 8 +- roles/hdfs/journalnode/tasks/start.yml | 2 +- roles/hdfs/journalnode/tasks/status.yml | 4 +- roles/hdfs/journalnode/tasks/stop.yml | 2 +- roles/hdfs/namenode/tasks/check.yml | 18 +- roles/hdfs/namenode/tasks/config.yml | 16 +- roles/hdfs/namenode/tasks/formatzk.yml | 2 +- roles/hdfs/namenode/tasks/install.yml | 8 +- roles/hdfs/namenode/tasks/jmx-exporter.yml | 6 +- roles/hdfs/namenode/tasks/kerberos.yml | 14 +- roles/hdfs/namenode/tasks/restart.yml | 4 +- roles/hdfs/namenode/tasks/ssl-tls.yml | 10 +- roles/hdfs/namenode/tasks/start_active_nn.yml | 6 +- .../hdfs/namenode/tasks/start_standby_nn.yml | 8 +- roles/hdfs/namenode/tasks/status.yml | 6 +- roles/hdfs/namenode/tasks/stop.yml | 4 +- roles/hdfs/ranger/tasks/check.yml | 4 +- roles/hdfs/ranger/tasks/config.yml | 10 +- roles/hdfs/ranger/tasks/init.yml | 2 +- roles/hdfs/ranger/tasks/install.yml | 8 +- roles/hive/client/tasks/config.yml | 16 +- roles/hive/client/tasks/install.yml | 8 +- roles/hive/client/tasks/kerberos.yml | 6 +- roles/hive/client/tasks/ssl-tls.yml | 4 +- roles/hive/common/tasks/hdfs_init.yml | 6 +- roles/hive/common/tasks/hive_yarn_user.yml | 2 +- roles/hive/common/tasks/init_schema.yml | 4 +- roles/hive/common/tasks/install_hive.yml | 30 +- roles/hive/hiveserver2/tasks/config.yml | 14 +- roles/hive/hiveserver2/tasks/install.yml | 8 +- roles/hive/hiveserver2/tasks/jmx-exporter.yml | 4 +- roles/hive/hiveserver2/tasks/kerberos.yml | 10 +- roles/hive/hiveserver2/tasks/restart.yml | 2 +- roles/hive/hiveserver2/tasks/ssl-tls.yml | 4 +- roles/hive/hiveserver2/tasks/start.yml | 2 +- roles/hive/hiveserver2/tasks/status.yml | 4 +- roles/hive/hiveserver2/tasks/stop.yml | 2 +- roles/hive/metastore/tasks/config.yml | 14 +- roles/hive/metastore/tasks/install.yml | 12 +- roles/hive/metastore/tasks/jmx-exporter.yml | 4 +- roles/hive/metastore/tasks/kerberos.yml | 6 +- roles/hive/metastore/tasks/restart.yml | 2 +- roles/hive/metastore/tasks/start.yml | 2 +- roles/hive/metastore/tasks/status.yml | 4 +- roles/hive/metastore/tasks/stop.yml | 2 +- roles/hive/ranger/tasks/config.yml | 10 +- roles/hive/ranger/tasks/init.yml | 2 +- roles/hive/ranger/tasks/install.yml | 8 +- roles/knox/common/tasks/install.yml | 22 +- roles/knox/gateway/tasks/config.yml | 42 +-- roles/knox/gateway/tasks/install.yml | 12 +- roles/knox/gateway/tasks/jmx-exporter.yml | 4 +- roles/knox/gateway/tasks/kerberos.yml | 10 +- roles/knox/gateway/tasks/restart.yml | 2 +- roles/knox/gateway/tasks/ssl-tls.yml | 4 +- roles/knox/gateway/tasks/start.yml | 2 +- roles/knox/gateway/tasks/status.yml | 4 +- roles/knox/gateway/tasks/stop.yml | 2 +- roles/knox/ranger/tasks/config.yml | 10 +- roles/knox/ranger/tasks/init.yml | 6 +- roles/knox/ranger/tasks/install.yml | 8 +- roles/ranger/admin/tasks/config.yml | 18 +- roles/ranger/admin/tasks/hdfs.yml | 2 +- roles/ranger/admin/tasks/install.yml | 18 +- roles/ranger/admin/tasks/jmx-exporter.yml | 4 +- roles/ranger/admin/tasks/kerberos.yml | 18 +- roles/ranger/admin/tasks/restart.yml | 2 +- roles/ranger/admin/tasks/ssl-tls.yml | 6 +- roles/ranger/admin/tasks/start.yml | 2 +- roles/ranger/admin/tasks/status.yml | 4 +- roles/ranger/admin/tasks/stop.yml | 2 +- roles/ranger/common/tasks/install.yml | 8 +- roles/ranger/kms/tasks/config.yml | 20 +- roles/ranger/kms/tasks/init.yml | 2 +- roles/ranger/kms/tasks/install.yml | 24 +- roles/ranger/kms/tasks/jmx-exporter.yml | 4 +- roles/ranger/kms/tasks/kerberos.yml | 10 +- roles/ranger/kms/tasks/restart.yml | 2 +- roles/ranger/kms/tasks/ssl-tls.yml | 6 +- roles/ranger/kms/tasks/start.yml | 2 +- roles/ranger/kms/tasks/status.yml | 4 +- roles/ranger/kms/tasks/stop.yml | 2 +- roles/ranger/solr/tasks/init.yml | 2 +- roles/ranger/solr/tasks/install.yml | 34 +-- roles/ranger/solr/tasks/restart.yml | 2 +- roles/ranger/solr/tasks/start.yml | 2 +- roles/ranger/solr/tasks/status.yml | 4 +- roles/ranger/solr/tasks/stop.yml | 2 +- roles/ranger/usersync/tasks/config.yml | 12 +- roles/ranger/usersync/tasks/install.yml | 18 +- roles/ranger/usersync/tasks/jmx-exporter.yml | 4 +- roles/ranger/usersync/tasks/kerberos.yml | 6 +- roles/ranger/usersync/tasks/restart.yml | 2 +- roles/ranger/usersync/tasks/ssl-tls.yml | 4 +- roles/ranger/usersync/tasks/start.yml | 2 +- roles/ranger/usersync/tasks/status.yml | 4 +- roles/ranger/usersync/tasks/stop.yml | 2 +- roles/spark/client/tasks/config.yml | 10 +- roles/spark/client/tasks/install.yml | 16 +- roles/spark/client/tasks/kerberos.yml | 6 +- roles/spark/common/tasks/hdfs_user.yml | 2 +- roles/spark/common/tasks/install.yml | 14 +- roles/spark/historyserver/tasks/config.yml | 10 +- roles/spark/historyserver/tasks/install.yml | 6 +- .../historyserver/tasks/jmx-exporter.yml | 4 +- roles/spark/historyserver/tasks/kerberos.yml | 12 +- roles/spark/historyserver/tasks/restart.yml | 2 +- roles/spark/historyserver/tasks/ssl-tls.yml | 6 +- roles/spark/historyserver/tasks/start.yml | 2 +- roles/spark/historyserver/tasks/status.yml | 4 +- roles/spark/historyserver/tasks/stop.yml | 2 +- roles/utils/group/tasks/main.yml | 2 +- roles/utils/jceks/tasks/local.yml | 6 +- .../kerberos/tasks/check_secure_keytab.yml | 4 +- .../create_headless_principal_keytab.yml | 20 +- .../tasks/create_principal_keytab.yml | 4 +- roles/utils/kerberos/tasks/install.yml | 2 +- roles/utils/ranger_policies/tasks/main.yml | 5 +- .../utils/ssl_tls/tasks/convert_cert_key.yml | 4 +- roles/utils/ssl_tls/tasks/create_keystore.yml | 8 +- .../utils/ssl_tls/tasks/create_truststore.yml | 4 +- .../utils/ssl_tls/tasks/verify_truststore.yml | 4 +- roles/utils/user/tasks/main.yml | 2 +- roles/utils/xml/tasks/merge.yml | 4 +- roles/yarn/apptimelineserver/tasks/config.yml | 14 +- .../yarn/apptimelineserver/tasks/install.yml | 6 +- .../apptimelineserver/tasks/jmx-exporter.yml | 4 +- .../yarn/apptimelineserver/tasks/kerberos.yml | 12 +- .../yarn/apptimelineserver/tasks/restart.yml | 2 +- .../yarn/apptimelineserver/tasks/ssl-tls.yml | 8 +- roles/yarn/apptimelineserver/tasks/start.yml | 2 +- roles/yarn/apptimelineserver/tasks/status.yml | 4 +- roles/yarn/apptimelineserver/tasks/stop.yml | 2 +- roles/yarn/client/tasks/config.yml | 2 +- roles/yarn/client/tasks/install.yml | 4 +- roles/yarn/client/tasks/kerberos.yml | 6 +- roles/yarn/common/tasks/install.yml | 10 +- roles/yarn/jobhistoryserver/tasks/config.yml | 16 +- roles/yarn/jobhistoryserver/tasks/install.yml | 14 +- .../jobhistoryserver/tasks/jmx-exporter.yml | 4 +- .../yarn/jobhistoryserver/tasks/kerberos.yml | 12 +- roles/yarn/jobhistoryserver/tasks/restart.yml | 2 +- roles/yarn/jobhistoryserver/tasks/ssl-tls.yml | 12 +- roles/yarn/jobhistoryserver/tasks/start.yml | 2 +- roles/yarn/jobhistoryserver/tasks/status.yml | 4 +- roles/yarn/jobhistoryserver/tasks/stop.yml | 2 +- roles/yarn/nodemanager/tasks/config.yml | 16 +- roles/yarn/nodemanager/tasks/install.yml | 18 +- roles/yarn/nodemanager/tasks/jmx-exporter.yml | 4 +- roles/yarn/nodemanager/tasks/kerberos.yml | 12 +- roles/yarn/nodemanager/tasks/restart.yml | 2 +- roles/yarn/nodemanager/tasks/ssl-tls.yml | 8 +- roles/yarn/nodemanager/tasks/start.yml | 2 +- roles/yarn/nodemanager/tasks/status.yml | 4 +- roles/yarn/nodemanager/tasks/stop.yml | 2 +- roles/yarn/ranger/tasks/config.yml | 10 +- roles/yarn/ranger/tasks/init.yml | 2 +- roles/yarn/ranger/tasks/install.yml | 8 +- .../tasks/capacity_scheduler.yml | 4 +- roles/yarn/resourcemanager/tasks/config.yml | 20 +- roles/yarn/resourcemanager/tasks/install.yml | 6 +- .../resourcemanager/tasks/jmx-exporter.yml | 4 +- roles/yarn/resourcemanager/tasks/kerberos.yml | 14 +- roles/yarn/resourcemanager/tasks/restart.yml | 2 +- roles/yarn/resourcemanager/tasks/ssl-tls.yml | 12 +- roles/yarn/resourcemanager/tasks/start.yml | 2 +- roles/yarn/resourcemanager/tasks/status.yml | 4 +- roles/yarn/resourcemanager/tasks/stop.yml | 2 +- roles/zookeeper/check/tasks/main.yml | 10 +- roles/zookeeper/client/tasks/config.yml | 8 +- roles/zookeeper/client/tasks/install.yml | 6 +- roles/zookeeper/client/tasks/kerberos.yml | 8 +- roles/zookeeper/common/tasks/install.yml | 16 +- roles/zookeeper/server/tasks/check.yml | 10 +- roles/zookeeper/server/tasks/config.yml | 12 +- roles/zookeeper/server/tasks/install.yml | 12 +- roles/zookeeper/server/tasks/jmx-exporter.yml | 4 +- roles/zookeeper/server/tasks/kerberos.yml | 8 +- roles/zookeeper/server/tasks/restart.yml | 2 +- roles/zookeeper/server/tasks/start.yml | 2 +- roles/zookeeper/server/tasks/status.yml | 4 +- roles/zookeeper/server/tasks/stop.yml | 2 +- 521 files changed, 1826 insertions(+), 1838 deletions(-) diff --git a/README.md b/README.md index 589f84c0..cb3dd71f 100644 --- a/README.md +++ b/README.md @@ -115,13 +115,13 @@ The best way to use the roles from the collection is to call the related file fr Examples: ``` - name: Deploy ZooKeeper - import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/zookeeper.yml + ansible.builtin.import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/zookeeper.yml - name: Deploy Hadoop - import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/hadoop.yml + ansible.builtin.import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/hadoop.yml - name: Deploy Hive - import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/hive.yml + ansible.builtin.import_playbook: ansible_roles/collections/ansible_collections/tosit/tdp/playbooks/hive.yml ``` ## Contribute diff --git a/playbooks/exporter_jmx_install.yml b/playbooks/exporter_jmx_install.yml index 46d11491..598acbf6 100644 --- a/playbooks/exporter_jmx_install.yml +++ b/playbooks/exporter_jmx_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: exporter_jmx - name: Install jmx exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.exporter.jmx tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hadoop_client_config.yml b/playbooks/hadoop_client_config.yml index c92c69bd..24e66ccf 100644 --- a/playbooks/hadoop_client_config.yml +++ b/playbooks/hadoop_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hadoop_client - name: Configure hadoop client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hadoop_client_install.yml b/playbooks/hadoop_client_install.yml index 8930c873..0beb05bb 100644 --- a/playbooks/hadoop_client_install.yml +++ b/playbooks/hadoop_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hadoop_client - name: Install hadoop client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_client_config.yml b/playbooks/hbase_client_config.yml index 217b2a1f..4c0cc6c3 100644 --- a/playbooks/hbase_client_config.yml +++ b/playbooks/hbase_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_client - name: Configure HBase Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_client_install.yml b/playbooks/hbase_client_install.yml index c25cc7bf..7b87356e 100644 --- a/playbooks/hbase_client_install.yml +++ b/playbooks/hbase_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_client - name: Install HBase Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_hdfs_init.yml b/playbooks/hbase_hdfs_init.yml index cabd41d6..2ee238a5 100644 --- a/playbooks/hbase_hdfs_init.yml +++ b/playbooks/hbase_hdfs_init.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_hdfs - name: Initialize HBase HDFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_jmx-exporter_config.yml b/playbooks/hbase_jmx-exporter_config.yml index 1fd46041..357d59b1 100644 --- a/playbooks/hbase_jmx-exporter_config.yml +++ b/playbooks/hbase_jmx-exporter_config.yml @@ -8,10 +8,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_jmx-exporter - name: Configure HBase Master jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter HBase RegionServer config hosts: hbase_rs @@ -19,10 +19,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_jmx-exporter - name: Configure HBase RegionServer jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter HBase Rest config hosts: hbase_rest @@ -30,10 +30,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_jmx-exporter - name: Configure HBase Rest jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter HBase Phoenix QueryServer config hosts: phoenix_queryserver_daemon @@ -41,7 +41,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_jmx-exporter - name: Configure HBase Phoenix QueryServer jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_kerberos_install.yml b/playbooks/hbase_kerberos_install.yml index 05471eb3..3fe67686 100644 --- a/playbooks/hbase_kerberos_install.yml +++ b/playbooks/hbase_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_kerberos - name: Install HBase Master Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HBase RegionServer install hosts: hbase_rs strategy: linear @@ -20,10 +20,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_kerberos - name: Install HBase RegionServer Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HBase Rest install hosts: hbase_rest strategy: linear @@ -31,10 +31,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_kerberos - name: Install HBase Rest Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HBase Client install hosts: hbase_client strategy: linear @@ -42,7 +42,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_kerberos - name: Install HBase Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_config.yml b/playbooks/hbase_master_config.yml index 20bde28c..3333fdab 100644 --- a/playbooks/hbase_master_config.yml +++ b/playbooks/hbase_master_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Configure HBase Master - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_install.yml b/playbooks/hbase_master_install.yml index 2a3215bc..f0ae9b98 100644 --- a/playbooks/hbase_master_install.yml +++ b/playbooks/hbase_master_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Install HBase Master - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_restart.yml b/playbooks/hbase_master_restart.yml index ea7b1bf3..86e23bfd 100644 --- a/playbooks/hbase_master_restart.yml +++ b/playbooks/hbase_master_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Restart HBase Master - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_start.yml b/playbooks/hbase_master_start.yml index ae48ea56..5a8852ee 100644 --- a/playbooks/hbase_master_start.yml +++ b/playbooks/hbase_master_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Start HBase Master - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_status.yml b/playbooks/hbase_master_status.yml index b20839cb..db4cc0db 100644 --- a/playbooks/hbase_master_status.yml +++ b/playbooks/hbase_master_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: HBase Master status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_master_stop.yml b/playbooks/hbase_master_stop.yml index 82b78549..7084a621 100644 --- a/playbooks/hbase_master_stop.yml +++ b/playbooks/hbase_master_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Stop HBase Master - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_client_install.yml b/playbooks/hbase_phoenix_client_install.yml index 6ce805ac..b02420ca 100644 --- a/playbooks/hbase_phoenix_client_install.yml +++ b/playbooks/hbase_phoenix_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_client - name: Instal HBase Phoenix Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_coprocessor_install.yml b/playbooks/hbase_phoenix_coprocessor_install.yml index b4c1cdab..fd71dbd7 100644 --- a/playbooks/hbase_phoenix_coprocessor_install.yml +++ b/playbooks/hbase_phoenix_coprocessor_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_coprocessor - name: Install HBase Phoenix Coprocessor - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.coprocessor tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_kerberos_install.yml b/playbooks/hbase_phoenix_kerberos_install.yml index e7609526..253702d9 100644 --- a/playbooks/hbase_phoenix_kerberos_install.yml +++ b/playbooks/hbase_phoenix_kerberos_install.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_kerberos - name: Install HBase Phoenix QueryServer Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_client_config.yml b/playbooks/hbase_phoenix_queryserver_client_config.yml index ede5721b..4700649c 100644 --- a/playbooks/hbase_phoenix_queryserver_client_config.yml +++ b/playbooks/hbase_phoenix_queryserver_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_client - name: Configure HBase Phoenix QueryServer Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_client_install.yml b/playbooks/hbase_phoenix_queryserver_client_install.yml index 7b305ceb..8a48a1c3 100644 --- a/playbooks/hbase_phoenix_queryserver_client_install.yml +++ b/playbooks/hbase_phoenix_queryserver_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_client - name: Install HBase Phoenix QueryServer Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_config.yml b/playbooks/hbase_phoenix_queryserver_daemon_config.yml index d36fc193..23bef4ef 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_config.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: Configure HBase Phoenix QueryServer Daemon - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_install.yml b/playbooks/hbase_phoenix_queryserver_daemon_install.yml index 97da7b27..c089fceb 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_install.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: Install HBase Phoenix QueryServer Daemon - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_restart.yml b/playbooks/hbase_phoenix_queryserver_daemon_restart.yml index 6a2f62ef..c4618a53 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_restart.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: Restart HBase Phoenix QueryServer Daemon - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_start.yml b/playbooks/hbase_phoenix_queryserver_daemon_start.yml index 47b9505b..ccb1a7a8 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_start.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: Start HBase Phoenix QueryServer Daemon - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_status.yml b/playbooks/hbase_phoenix_queryserver_daemon_status.yml index 66132b6b..c2fef0d7 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_status.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: HBase Phoenix QueryServer Daemon status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_queryserver_daemon_stop.yml b/playbooks/hbase_phoenix_queryserver_daemon_stop.yml index 4f79ef67..50a541ab 100644 --- a/playbooks/hbase_phoenix_queryserver_daemon_stop.yml +++ b/playbooks/hbase_phoenix_queryserver_daemon_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver_daemon - name: Stop HBase Phoenix QueryServer Daemon - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_ranger_init.yml b/playbooks/hbase_phoenix_ranger_init.yml index 650371e5..d92eee0a 100644 --- a/playbooks/hbase_phoenix_ranger_init.yml +++ b/playbooks/hbase_phoenix_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_ranger - name: Initialize HBase Phoenix Ranger policy - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.coprocessor tasks_from: ranger_phoenix_policy - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_phoenix_ssl-tls_install.yml b/playbooks/hbase_phoenix_ssl-tls_install.yml index 0a16e532..8c888ae4 100644 --- a/playbooks/hbase_phoenix_ssl-tls_install.yml +++ b/playbooks/hbase_phoenix_ssl-tls_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_phoenix_queryserver - name: Install HBase Phoenix QueryServer SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.daemon tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_ranger_config.yml b/playbooks/hbase_ranger_config.yml index 68d0400a..f75fa687 100644 --- a/playbooks/hbase_ranger_config.yml +++ b/playbooks/hbase_ranger_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_ranger - name: Configure HBase Ranger Plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.ranger tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_ranger_init.yml b/playbooks/hbase_ranger_init.yml index dff26914..0c0a8ad3 100644 --- a/playbooks/hbase_ranger_init.yml +++ b/playbooks/hbase_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_ranger - name: Initialize HBase Ranger Plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.ranger tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_ranger_install.yml b/playbooks/hbase_ranger_install.yml index 77a8f2f8..0b940b43 100644 --- a/playbooks/hbase_ranger_install.yml +++ b/playbooks/hbase_ranger_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_ranger - name: Install HBase Ranger Plugi - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.ranger tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_config.yml b/playbooks/hbase_regionserver_config.yml index bc058d22..6fa18f87 100644 --- a/playbooks/hbase_regionserver_config.yml +++ b/playbooks/hbase_regionserver_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Configure HBase RegionServer - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_install.yml b/playbooks/hbase_regionserver_install.yml index 5f2d56cf..0a8952b6 100644 --- a/playbooks/hbase_regionserver_install.yml +++ b/playbooks/hbase_regionserver_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Install HBase RegionServer - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_restart.yml b/playbooks/hbase_regionserver_restart.yml index 104aaef7..e8187756 100644 --- a/playbooks/hbase_regionserver_restart.yml +++ b/playbooks/hbase_regionserver_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Restart HBase RegionServer - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_start.yml b/playbooks/hbase_regionserver_start.yml index 4fe8f6fd..1f4c1bab 100644 --- a/playbooks/hbase_regionserver_start.yml +++ b/playbooks/hbase_regionserver_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Start HBase RegionServer - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_status.yml b/playbooks/hbase_regionserver_status.yml index 5b6017ee..8f23eb91 100644 --- a/playbooks/hbase_regionserver_status.yml +++ b/playbooks/hbase_regionserver_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: HBase RegionServer status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_regionserver_stop.yml b/playbooks/hbase_regionserver_stop.yml index adc898ff..14b58818 100644 --- a/playbooks/hbase_regionserver_stop.yml +++ b/playbooks/hbase_regionserver_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Stop HBase RegionServer - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_config.yml b/playbooks/hbase_rest_config.yml index b1cafbc0..c21a5e1d 100644 --- a/playbooks/hbase_rest_config.yml +++ b/playbooks/hbase_rest_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Configure HBase REST - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_install.yml b/playbooks/hbase_rest_install.yml index 3b9481b1..1d757ab3 100644 --- a/playbooks/hbase_rest_install.yml +++ b/playbooks/hbase_rest_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Install HBase REST - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_restart.yml b/playbooks/hbase_rest_restart.yml index df21c244..36ea9c06 100644 --- a/playbooks/hbase_rest_restart.yml +++ b/playbooks/hbase_rest_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Restart HBase REST - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_start.yml b/playbooks/hbase_rest_start.yml index 1917782a..97857eec 100644 --- a/playbooks/hbase_rest_start.yml +++ b/playbooks/hbase_rest_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Start HBase REST - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_status.yml b/playbooks/hbase_rest_status.yml index 929d54ed..d723be88 100644 --- a/playbooks/hbase_rest_status.yml +++ b/playbooks/hbase_rest_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: HBase REST status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_rest_stop.yml b/playbooks/hbase_rest_stop.yml index 38b5128c..77b3ae43 100644 --- a/playbooks/hbase_rest_stop.yml +++ b/playbooks/hbase_rest_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Stop HBase REST - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hbase_ssl-tls_install.yml b/playbooks/hbase_ssl-tls_install.yml index e247a0d0..7f5c45d0 100644 --- a/playbooks/hbase_ssl-tls_install.yml +++ b/playbooks/hbase_ssl-tls_install.yml @@ -8,27 +8,27 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_master - name: Install HBase Master SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.master tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS HBase RegionServer install hosts: hbase_rs tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_regionserver - name: Install HBase RegionServer SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.regionserver tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS HBase Rest install hosts: hbase_rest tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hbase_rest - name: Install HBase Rest SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.rest tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_audit_init.yml b/playbooks/hdfs_audit_init.yml index 6a971a67..06a8390a 100644 --- a/playbooks/hdfs_audit_init.yml +++ b/playbooks/hdfs_audit_init.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_audit_init - name: HDFS init - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: hdfs_audit_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_check.yml b/playbooks/hdfs_check.yml index 2d83d91e..9337e21d 100644 --- a/playbooks/hdfs_check.yml +++ b/playbooks/hdfs_check.yml @@ -10,6 +10,6 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_check - name: Check HDFS service - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_client_config.yml b/playbooks/hdfs_client_config.yml index afea7e91..a512c5d2 100644 --- a/playbooks/hdfs_client_config.yml +++ b/playbooks/hdfs_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_client - name: Configure HDFS client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_client_install.yml b/playbooks/hdfs_client_install.yml index a9602f54..57c0a988 100644 --- a/playbooks/hdfs_client_install.yml +++ b/playbooks/hdfs_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_client - name: Install HDFS client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_check.yml b/playbooks/hdfs_datanode_check.yml index 2dde1b2c..925df3d5 100644 --- a/playbooks/hdfs_datanode_check.yml +++ b/playbooks/hdfs_datanode_check.yml @@ -10,7 +10,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Check HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_config.yml b/playbooks/hdfs_datanode_config.yml index f9cc8558..c41c4d67 100644 --- a/playbooks/hdfs_datanode_config.yml +++ b/playbooks/hdfs_datanode_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Configure HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_install.yml b/playbooks/hdfs_datanode_install.yml index 160da24a..84411f09 100644 --- a/playbooks/hdfs_datanode_install.yml +++ b/playbooks/hdfs_datanode_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Install HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_restart.yml b/playbooks/hdfs_datanode_restart.yml index 75a73e8a..9c402723 100644 --- a/playbooks/hdfs_datanode_restart.yml +++ b/playbooks/hdfs_datanode_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Restart HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_start.yml b/playbooks/hdfs_datanode_start.yml index 9a63eb91..9c1bdf8b 100644 --- a/playbooks/hdfs_datanode_start.yml +++ b/playbooks/hdfs_datanode_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Start HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_status.yml b/playbooks/hdfs_datanode_status.yml index 9a0a6904..d0950c5c 100644 --- a/playbooks/hdfs_datanode_status.yml +++ b/playbooks/hdfs_datanode_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: HDFS datanode status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_datanode_stop.yml b/playbooks/hdfs_datanode_stop.yml index a8abcc43..8af8edef 100644 --- a/playbooks/hdfs_datanode_stop.yml +++ b/playbooks/hdfs_datanode_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Stop HDFS datanode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_config.yml b/playbooks/hdfs_httpfs_config.yml index 47ce19e1..a7c385ba 100644 --- a/playbooks/hdfs_httpfs_config.yml +++ b/playbooks/hdfs_httpfs_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Configure HDFS HttpFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_install.yml b/playbooks/hdfs_httpfs_install.yml index 08200e77..34eab975 100644 --- a/playbooks/hdfs_httpfs_install.yml +++ b/playbooks/hdfs_httpfs_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Install HDFS HttpFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_restart.yml b/playbooks/hdfs_httpfs_restart.yml index 16d1ec4f..ca28a9ae 100644 --- a/playbooks/hdfs_httpfs_restart.yml +++ b/playbooks/hdfs_httpfs_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Restart HDFS HttpFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_start.yml b/playbooks/hdfs_httpfs_start.yml index cf979cab..a9f1b1a8 100644 --- a/playbooks/hdfs_httpfs_start.yml +++ b/playbooks/hdfs_httpfs_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Start HDFS HttpFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_status.yml b/playbooks/hdfs_httpfs_status.yml index e096d88e..8fdb9906 100644 --- a/playbooks/hdfs_httpfs_status.yml +++ b/playbooks/hdfs_httpfs_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: HDFS HttpFs status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_httpfs_stop.yml b/playbooks/hdfs_httpfs_stop.yml index 20e258e4..67b493b1 100644 --- a/playbooks/hdfs_httpfs_stop.yml +++ b/playbooks/hdfs_httpfs_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Stop HDFS HttpFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_jmx-exporter_config.yml b/playbooks/hdfs_jmx-exporter_config.yml index 16e5d821..79d622a3 100644 --- a/playbooks/hdfs_jmx-exporter_config.yml +++ b/playbooks/hdfs_jmx-exporter_config.yml @@ -8,37 +8,37 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_jmx-exporter - name: Configure Namenode jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Journalnode config hosts: hdfs_jn tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_jmx-exporter - name: Configure Journalnode jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Datanode config hosts: hdfs_dn tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_jmx-exporter - name: Configure Datanode jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter HttpFS config hosts: hdfs_httpfs tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_jmx-exporter - name: Configure HttpFS jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_check.yml b/playbooks/hdfs_journalnode_check.yml index 6ba660f7..f2a49cbd 100644 --- a/playbooks/hdfs_journalnode_check.yml +++ b/playbooks/hdfs_journalnode_check.yml @@ -10,7 +10,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Check HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_config.yml b/playbooks/hdfs_journalnode_config.yml index 56512c1d..198dd461 100644 --- a/playbooks/hdfs_journalnode_config.yml +++ b/playbooks/hdfs_journalnode_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Configure HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_install.yml b/playbooks/hdfs_journalnode_install.yml index 28675481..06c9ca6a 100644 --- a/playbooks/hdfs_journalnode_install.yml +++ b/playbooks/hdfs_journalnode_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Install HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_restart.yml b/playbooks/hdfs_journalnode_restart.yml index 7c00ef42..bf2c88d8 100644 --- a/playbooks/hdfs_journalnode_restart.yml +++ b/playbooks/hdfs_journalnode_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Restart HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_start.yml b/playbooks/hdfs_journalnode_start.yml index dc826ed8..f84d31b8 100644 --- a/playbooks/hdfs_journalnode_start.yml +++ b/playbooks/hdfs_journalnode_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Start HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_status.yml b/playbooks/hdfs_journalnode_status.yml index d454771a..3ee832e4 100644 --- a/playbooks/hdfs_journalnode_status.yml +++ b/playbooks/hdfs_journalnode_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: HDFS journalnode status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_journalnode_stop.yml b/playbooks/hdfs_journalnode_stop.yml index 4d01b74f..4d743fdc 100644 --- a/playbooks/hdfs_journalnode_stop.yml +++ b/playbooks/hdfs_journalnode_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Stop HDFS journalnode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_kerberos_install.yml b/playbooks/hdfs_kerberos_install.yml index 5a3db49b..934c9cd7 100644 --- a/playbooks/hdfs_kerberos_install.yml +++ b/playbooks/hdfs_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_kerberos - name: Install Namenode Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Journalnode install hosts: hdfs_jn strategy: linear @@ -20,10 +20,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_kerberos - name: Install Journalnode Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Datanode install hosts: hdfs_dn strategy: linear @@ -31,10 +31,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_kerberos - name: Install Datanode Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HDFS Client install hosts: hadoop_client strategy: linear @@ -42,10 +42,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_kerberos - name: Install HDFS Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HttpFS install hosts: hdfs_httpfs strategy: linear @@ -53,7 +53,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_kerberos - name: Install HttpFS Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_check.yml b/playbooks/hdfs_namenode_check.yml index 0dd97a80..91a8b46d 100644 --- a/playbooks/hdfs_namenode_check.yml +++ b/playbooks/hdfs_namenode_check.yml @@ -10,7 +10,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Check HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_config.yml b/playbooks/hdfs_namenode_config.yml index 6747f204..889db84c 100644 --- a/playbooks/hdfs_namenode_config.yml +++ b/playbooks/hdfs_namenode_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Configure HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_formatzk.yml b/playbooks/hdfs_namenode_formatzk.yml index 4df24fe3..799d002f 100644 --- a/playbooks/hdfs_namenode_formatzk.yml +++ b/playbooks/hdfs_namenode_formatzk.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Format HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: formatzk - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_install.yml b/playbooks/hdfs_namenode_install.yml index 2e46549e..d5a69975 100644 --- a/playbooks/hdfs_namenode_install.yml +++ b/playbooks/hdfs_namenode_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Install HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_restart.yml b/playbooks/hdfs_namenode_restart.yml index 37de36c9..25f1119c 100644 --- a/playbooks/hdfs_namenode_restart.yml +++ b/playbooks/hdfs_namenode_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Restart HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_start.yml b/playbooks/hdfs_namenode_start.yml index 5574d3b3..98f8ff0a 100644 --- a/playbooks/hdfs_namenode_start.yml +++ b/playbooks/hdfs_namenode_start.yml @@ -8,17 +8,17 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Start active HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: start_active_nn - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Hadoop HDFS standby namenode start hosts: hdfs_nn[1] tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Start standby HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: start_standby_nn - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_status.yml b/playbooks/hdfs_namenode_status.yml index f45fc5c8..a7f8e05a 100644 --- a/playbooks/hdfs_namenode_status.yml +++ b/playbooks/hdfs_namenode_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: HDFS namenode status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_namenode_stop.yml b/playbooks/hdfs_namenode_stop.yml index d574b76a..d46b5e6d 100644 --- a/playbooks/hdfs_namenode_stop.yml +++ b/playbooks/hdfs_namenode_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Stop HDFS namenode - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_ranger_check.yml b/playbooks/hdfs_ranger_check.yml index e527f991..afa27e87 100644 --- a/playbooks/hdfs_ranger_check.yml +++ b/playbooks/hdfs_ranger_check.yml @@ -10,7 +10,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_ranger - name: Check HDFS ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.ranger tasks_from: check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_ranger_config.yml b/playbooks/hdfs_ranger_config.yml index 49a3fa9a..af3c97e4 100644 --- a/playbooks/hdfs_ranger_config.yml +++ b/playbooks/hdfs_ranger_config.yml @@ -8,17 +8,17 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_ranger - name: Configure HDFS ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.ranger tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Hadoop HDFS Ranger plugin config Ranger Admin hosts: ranger_admin tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Configure HDFS Ranger admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: hdfs - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_ranger_init.yml b/playbooks/hdfs_ranger_init.yml index 9a127c01..be6df715 100644 --- a/playbooks/hdfs_ranger_init.yml +++ b/playbooks/hdfs_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_ranger - name: Initialize HDFS Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.ranger tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_ranger_install.yml b/playbooks/hdfs_ranger_install.yml index 6a93f420..3fd91c8d 100644 --- a/playbooks/hdfs_ranger_install.yml +++ b/playbooks/hdfs_ranger_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_ranger - name: Install HDFS Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.ranger tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hdfs_ssl-tls_install.yml b/playbooks/hdfs_ssl-tls_install.yml index 1981ba8a..c7d7ca4f 100644 --- a/playbooks/hdfs_ssl-tls_install.yml +++ b/playbooks/hdfs_ssl-tls_install.yml @@ -8,40 +8,40 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_namenode - name: Install Namenode SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.namenode tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Journalnode install hosts: hdfs_jn tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_journalnode - name: Install Journalnode SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.journalnode tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Datanode install hosts: hdfs_dn tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_datanode - name: Install Datanode SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.datanode tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS HDFS Client install hosts: hadoop_client tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_client - name: Install HDFS Client SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.client tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS HDFS HttpFS install hosts: hdfs_httpfs @@ -49,7 +49,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_httpfs - name: Install HDFS HttpFS SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.httpfs tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_client_config.yml b/playbooks/hive_client_config.yml index 886cb9ae..8db6d880 100644 --- a/playbooks/hive_client_config.yml +++ b/playbooks/hive_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_client - name: Configure Hive Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_client_install.yml b/playbooks/hive_client_install.yml index 86244118..c08b2a9b 100644 --- a/playbooks/hive_client_install.yml +++ b/playbooks/hive_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_client - name: Install Hive Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hdfs_init.yml b/playbooks/hive_hdfs_init.yml index ad36eb0d..26a3ab8e 100644 --- a/playbooks/hive_hdfs_init.yml +++ b/playbooks/hive_hdfs_init.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hdfs - name: Initialize Hive HDFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_config.yml b/playbooks/hive_hiveserver2_config.yml index 6222d51b..e73b7d31 100644 --- a/playbooks/hive_hiveserver2_config.yml +++ b/playbooks/hive_hiveserver2_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Configure Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_install.yml b/playbooks/hive_hiveserver2_install.yml index 7da271b7..abe296e2 100644 --- a/playbooks/hive_hiveserver2_install.yml +++ b/playbooks/hive_hiveserver2_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Install Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_restart.yml b/playbooks/hive_hiveserver2_restart.yml index e9d3f394..66a44cb5 100644 --- a/playbooks/hive_hiveserver2_restart.yml +++ b/playbooks/hive_hiveserver2_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Restart Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_start.yml b/playbooks/hive_hiveserver2_start.yml index 4934cab4..488ae3fc 100644 --- a/playbooks/hive_hiveserver2_start.yml +++ b/playbooks/hive_hiveserver2_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Start Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_status.yml b/playbooks/hive_hiveserver2_status.yml index b91892cd..0a060013 100644 --- a/playbooks/hive_hiveserver2_status.yml +++ b/playbooks/hive_hiveserver2_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_hiveserver2_stop.yml b/playbooks/hive_hiveserver2_stop.yml index 08947970..a3c1e68c 100644 --- a/playbooks/hive_hiveserver2_stop.yml +++ b/playbooks/hive_hiveserver2_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Stop Hive HiveServer2 - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_init_schema.yml b/playbooks/hive_init_schema.yml index 3fc97a39..9ac6d95e 100644 --- a/playbooks/hive_init_schema.yml +++ b/playbooks/hive_init_schema.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_init - name: Initialize Hive Schema - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: init_schema - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_install.yml b/playbooks/hive_install.yml index 7e33c23d..3cb6fc04 100644 --- a/playbooks/hive_install.yml +++ b/playbooks/hive_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_install - name: Install Hive YARN User - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: hive_yarn_user - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_jmx-exporter_config.yml b/playbooks/hive_jmx-exporter_config.yml index ee3bad68..ba796732 100644 --- a/playbooks/hive_jmx-exporter_config.yml +++ b/playbooks/hive_jmx-exporter_config.yml @@ -8,17 +8,17 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_jmx-exporter - name: Configure Hive HiveServer2 jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter HiveMetastore config hosts: hive_ms tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_jmx-exporter - name: Configure Hive Metastore jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_kerberos_install.yml b/playbooks/hive_kerberos_install.yml index a1a163b8..fc884047 100644 --- a/playbooks/hive_kerberos_install.yml +++ b/playbooks/hive_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_kerberos - name: Install Hive HiveServer2 Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos HiveMetastore install hosts: hive_ms strategy: linear @@ -20,10 +20,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_kerberos - name: Install Hive Metastore Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Hive Client install hosts: hive_client strategy: linear @@ -31,7 +31,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_kerberos - name: Install Hive Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_config.yml b/playbooks/hive_metastore_config.yml index 6e90bb7c..cb56491a 100644 --- a/playbooks/hive_metastore_config.yml +++ b/playbooks/hive_metastore_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Configure Hive Metastore - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_install.yml b/playbooks/hive_metastore_install.yml index 3be94199..f57fa24f 100644 --- a/playbooks/hive_metastore_install.yml +++ b/playbooks/hive_metastore_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Install Hive Metastore - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_restart.yml b/playbooks/hive_metastore_restart.yml index 65cefa15..042eda26 100644 --- a/playbooks/hive_metastore_restart.yml +++ b/playbooks/hive_metastore_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Restart Hive Metastore - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_start.yml b/playbooks/hive_metastore_start.yml index f93ed1f5..3d1046f1 100644 --- a/playbooks/hive_metastore_start.yml +++ b/playbooks/hive_metastore_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Start Hive Metastore - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_status.yml b/playbooks/hive_metastore_status.yml index f96cf45e..b0b502ec 100644 --- a/playbooks/hive_metastore_status.yml +++ b/playbooks/hive_metastore_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Hive Metastore status - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_metastore_stop.yml b/playbooks/hive_metastore_stop.yml index f8f5c848..0e018eb5 100644 --- a/playbooks/hive_metastore_stop.yml +++ b/playbooks/hive_metastore_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Stop Hive Metastore - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.metastore tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_ranger_config.yml b/playbooks/hive_ranger_config.yml index dab09065..95142de2 100644 --- a/playbooks/hive_ranger_config.yml +++ b/playbooks/hive_ranger_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_ranger - name: Configure Hive Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.ranger tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_ranger_init.yml b/playbooks/hive_ranger_init.yml index fb7aafaa..1c9bc2d7 100644 --- a/playbooks/hive_ranger_init.yml +++ b/playbooks/hive_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_ranger - name: Initialize Hive Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.ranger tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_ranger_install.yml b/playbooks/hive_ranger_install.yml index fb9860de..53b1a564 100644 --- a/playbooks/hive_ranger_install.yml +++ b/playbooks/hive_ranger_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_ranger - name: Install Hive Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.ranger tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/hive_ssl-tls_install.yml b/playbooks/hive_ssl-tls_install.yml index e91ab153..c05a89b4 100644 --- a/playbooks/hive_ssl-tls_install.yml +++ b/playbooks/hive_ssl-tls_install.yml @@ -8,10 +8,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_hiveserver2 - name: Install Hive HiveServer 2 SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.hiveserver2 tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Hive Client install hosts: hive_client @@ -19,7 +19,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: hive_metastore - name: Install Hive Client SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.client tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_config.yml b/playbooks/knox_gateway_config.yml index c11a0e42..3df7e1c4 100644 --- a/playbooks/knox_gateway_config.yml +++ b/playbooks/knox_gateway_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Configure Knox Gateway - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_install.yml b/playbooks/knox_gateway_install.yml index 7787f03f..61d04858 100644 --- a/playbooks/knox_gateway_install.yml +++ b/playbooks/knox_gateway_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Install Knox Gateway - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_restart.yml b/playbooks/knox_gateway_restart.yml index 12731b86..e3359c0c 100644 --- a/playbooks/knox_gateway_restart.yml +++ b/playbooks/knox_gateway_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Restart Knox Gateway - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_start.yml b/playbooks/knox_gateway_start.yml index c99dd7fe..1f16883f 100644 --- a/playbooks/knox_gateway_start.yml +++ b/playbooks/knox_gateway_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Start Knox Gateway - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_status.yml b/playbooks/knox_gateway_status.yml index a65308e1..fdb92287 100644 --- a/playbooks/knox_gateway_status.yml +++ b/playbooks/knox_gateway_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Knox Gateway status - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_gateway_stop.yml b/playbooks/knox_gateway_stop.yml index 173b631f..fdefd6a1 100644 --- a/playbooks/knox_gateway_stop.yml +++ b/playbooks/knox_gateway_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Stop Knox Gateway - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_hdfs_init.yml b/playbooks/knox_hdfs_init.yml index 3c2be515..6b564be3 100644 --- a/playbooks/knox_hdfs_init.yml +++ b/playbooks/knox_hdfs_init.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_hdfs - name: Initialize Knox HDFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_jmx-exporter_config.yml b/playbooks/knox_jmx-exporter_config.yml index b2d2696e..fa8fc1ae 100644 --- a/playbooks/knox_jmx-exporter_config.yml +++ b/playbooks/knox_jmx-exporter_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_jmx-exporter - name: Configure Knox Gateway jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_kerberos_install.yml b/playbooks/knox_kerberos_install.yml index fcb5a8ba..1ba6f06f 100644 --- a/playbooks/knox_kerberos_install.yml +++ b/playbooks/knox_kerberos_install.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_kerberos - name: Install Knox Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_ranger_config.yml b/playbooks/knox_ranger_config.yml index 5b026ee2..a7c3c86b 100644 --- a/playbooks/knox_ranger_config.yml +++ b/playbooks/knox_ranger_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_ranger - name: Configure Knox Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.ranger tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_ranger_init.yml b/playbooks/knox_ranger_init.yml index 2b6ca806..c0713773 100644 --- a/playbooks/knox_ranger_init.yml +++ b/playbooks/knox_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_ranger - name: Initialize Knox Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.ranger tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_ranger_install.yml b/playbooks/knox_ranger_install.yml index 837037a2..b3166689 100644 --- a/playbooks/knox_ranger_install.yml +++ b/playbooks/knox_ranger_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_ranger - name: Install Knox Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.ranger tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/knox_ssl-tls_install.yml b/playbooks/knox_ssl-tls_install.yml index 7d3a31f5..9f070035 100644 --- a/playbooks/knox_ssl-tls_install.yml +++ b/playbooks/knox_ssl-tls_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: knox_gateway - name: Install Knox SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.gateway tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/meta/all.yml b/playbooks/meta/all.yml index 88989081..33cb4631 100644 --- a/playbooks/meta/all.yml +++ b/playbooks/meta/all.yml @@ -2,76 +2,76 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../exporter_jmx_install.yml +- ansible.builtin.import_playbook: ../exporter_jmx_install.yml # exporter_install -- import_playbook: ../zookeeper_client_install.yml -- import_playbook: ../zookeeper_server_install.yml -- import_playbook: ../zookeeper_kerberos_install.yml +- ansible.builtin.import_playbook: ../zookeeper_client_install.yml +- ansible.builtin.import_playbook: ../zookeeper_server_install.yml +- ansible.builtin.import_playbook: ../zookeeper_kerberos_install.yml # zookeeper_install -- import_playbook: ../hadoop_client_install.yml +- ansible.builtin.import_playbook: ../hadoop_client_install.yml # hadoop_install -- import_playbook: ../ranger_admin_install.yml -- import_playbook: ../ranger_kms_install.yml -- import_playbook: ../ranger_solr_install.yml -- import_playbook: ../ranger_solr_start.yml -- import_playbook: ../ranger_solr_init.yml -- import_playbook: ../ranger_usersync_install.yml -- import_playbook: ../ranger_kerberos_install.yml -- import_playbook: ../ranger_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../ranger_admin_install.yml +- ansible.builtin.import_playbook: ../ranger_kms_install.yml +- ansible.builtin.import_playbook: ../ranger_solr_install.yml +- ansible.builtin.import_playbook: ../ranger_solr_start.yml +- ansible.builtin.import_playbook: ../ranger_solr_init.yml +- ansible.builtin.import_playbook: ../ranger_usersync_install.yml +- ansible.builtin.import_playbook: ../ranger_kerberos_install.yml +- ansible.builtin.import_playbook: ../ranger_ssl-tls_install.yml # ranger_install -- import_playbook: ../hdfs_client_install.yml -- import_playbook: ../hdfs_datanode_install.yml -- import_playbook: ../hdfs_httpfs_install.yml -- import_playbook: ../hdfs_journalnode_install.yml -- import_playbook: ../hdfs_namenode_install.yml -- import_playbook: ../hdfs_kerberos_install.yml -- import_playbook: ../hdfs_ranger_install.yml -- import_playbook: ../hdfs_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hdfs_client_install.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_install.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_install.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_install.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_install.yml +- ansible.builtin.import_playbook: ../hdfs_kerberos_install.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_install.yml +- ansible.builtin.import_playbook: ../hdfs_ssl-tls_install.yml # hdfs_install -- import_playbook: ../yarn_apptimelineserver_install.yml -- import_playbook: ../yarn_client_install.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_install.yml -- import_playbook: ../yarn_nodemanager_install.yml -- import_playbook: ../yarn_ranger_install.yml -- import_playbook: ../yarn_resourcemanager_install.yml -- import_playbook: ../yarn_kerberos_install.yml -- import_playbook: ../yarn_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_install.yml +- ansible.builtin.import_playbook: ../yarn_client_install.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_install.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_install.yml +- ansible.builtin.import_playbook: ../yarn_ranger_install.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_install.yml +- ansible.builtin.import_playbook: ../yarn_kerberos_install.yml +- ansible.builtin.import_playbook: ../yarn_ssl-tls_install.yml # yarn_install -- import_playbook: ../hive_client_install.yml -- import_playbook: ../hive_hiveserver2_install.yml -- import_playbook: ../hive_metastore_install.yml -- import_playbook: ../hive_kerberos_install.yml -- import_playbook: ../hive_ranger_install.yml -- import_playbook: ../hive_ssl-tls_install.yml -- import_playbook: ../hive_install.yml -- import_playbook: ../hbase_client_install.yml -- import_playbook: ../hbase_master_install.yml -- import_playbook: ../hbase_phoenix_client_install.yml -- import_playbook: ../hbase_phoenix_queryserver_client_install.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_install.yml -- import_playbook: ../hbase_phoenix_kerberos_install.yml -- import_playbook: ../hbase_phoenix_ssl-tls_install.yml -- import_playbook: ../hbase_ranger_install.yml -- import_playbook: ../hbase_regionserver_install.yml -- import_playbook: ../hbase_phoenix_coprocessor_install.yml -- import_playbook: ../hbase_rest_install.yml -- import_playbook: ../hbase_kerberos_install.yml -- import_playbook: ../hbase_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hive_client_install.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_install.yml +- ansible.builtin.import_playbook: ../hive_metastore_install.yml +- ansible.builtin.import_playbook: ../hive_kerberos_install.yml +- ansible.builtin.import_playbook: ../hive_ranger_install.yml +- ansible.builtin.import_playbook: ../hive_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hive_install.yml +- ansible.builtin.import_playbook: ../hbase_client_install.yml +- ansible.builtin.import_playbook: ../hbase_master_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_client_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_client_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_kerberos_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hbase_ranger_install.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_coprocessor_install.yml +- ansible.builtin.import_playbook: ../hbase_rest_install.yml +- ansible.builtin.import_playbook: ../hbase_kerberos_install.yml +- ansible.builtin.import_playbook: ../hbase_ssl-tls_install.yml # hbase_install -- import_playbook: ../spark_client_install.yml -- import_playbook: ../spark_historyserver_install.yml -- import_playbook: ../spark_kerberos_install.yml -- import_playbook: ../spark_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../spark_client_install.yml +- ansible.builtin.import_playbook: ../spark_historyserver_install.yml +- ansible.builtin.import_playbook: ../spark_kerberos_install.yml +- ansible.builtin.import_playbook: ../spark_ssl-tls_install.yml # spark_install -- import_playbook: ../spark3_client_install.yml -- import_playbook: ../spark3_historyserver_install.yml -- import_playbook: ../spark3_kerberos_install.yml -- import_playbook: ../spark3_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../spark3_client_install.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_install.yml +- ansible.builtin.import_playbook: ../spark3_kerberos_install.yml +- ansible.builtin.import_playbook: ../spark3_ssl-tls_install.yml # spark3_install -- import_playbook: ../knox_gateway_install.yml -- import_playbook: ../knox_kerberos_install.yml -- import_playbook: ../knox_ranger_install.yml -- import_playbook: ../knox_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../knox_gateway_install.yml +- ansible.builtin.import_playbook: ../knox_kerberos_install.yml +- ansible.builtin.import_playbook: ../knox_ranger_install.yml +- ansible.builtin.import_playbook: ../knox_ssl-tls_install.yml # knox_install # tdp-cluster_install # tdp-cluster_config @@ -79,128 +79,128 @@ # exporter_config # exporter_start # exporter_init -- import_playbook: ../zookeeper_client_config.yml -- import_playbook: ../zookeeper_jmx-exporter_config.yml -- import_playbook: ../zookeeper_server_config.yml +- ansible.builtin.import_playbook: ../zookeeper_client_config.yml +- ansible.builtin.import_playbook: ../zookeeper_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../zookeeper_server_config.yml # zookeeper_config -- import_playbook: ../zookeeper_server_start.yml +- ansible.builtin.import_playbook: ../zookeeper_server_start.yml # zookeeper_server_init # zookeeper_start # zookeeper_init -- import_playbook: ../hadoop_client_config.yml +- ansible.builtin.import_playbook: ../hadoop_client_config.yml # hadoop_config # hadoop_start # hadoop_init -- import_playbook: ../ranger_admin_config.yml -- import_playbook: ../ranger_jmx-exporter_config.yml -- import_playbook: ../ranger_admin_start.yml +- ansible.builtin.import_playbook: ../ranger_admin_config.yml +- ansible.builtin.import_playbook: ../ranger_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../ranger_admin_start.yml # ranger_admin_init -- import_playbook: ../ranger_kms_config.yml -- import_playbook: ../ranger_kms_start.yml -- import_playbook: ../ranger_kms_init.yml -- import_playbook: ../ranger_usersync_config.yml +- ansible.builtin.import_playbook: ../ranger_kms_config.yml +- ansible.builtin.import_playbook: ../ranger_kms_start.yml +- ansible.builtin.import_playbook: ../ranger_kms_init.yml +- ansible.builtin.import_playbook: ../ranger_usersync_config.yml # ranger_config -- import_playbook: ../ranger_usersync_start.yml +- ansible.builtin.import_playbook: ../ranger_usersync_start.yml # ranger_start # ranger_init -- import_playbook: ../hdfs_datanode_config.yml -- import_playbook: ../hdfs_httpfs_config.yml -- import_playbook: ../hdfs_jmx-exporter_config.yml -- import_playbook: ../hdfs_journalnode_config.yml -- import_playbook: ../hdfs_namenode_config.yml -- import_playbook: ../hdfs_client_config.yml -- import_playbook: ../hdfs_namenode_formatzk.yml -- import_playbook: ../hdfs_journalnode_start.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_config.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_config.yml +- ansible.builtin.import_playbook: ../hdfs_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_config.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_config.yml +- ansible.builtin.import_playbook: ../hdfs_client_config.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_formatzk.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_start.yml # hdfs_journalnode_init -- import_playbook: ../hdfs_ranger_config.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_config.yml # hdfs_config -- import_playbook: ../hdfs_namenode_start.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_start.yml # hdfs_namenode_init -- import_playbook: ../hdfs_datanode_start.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_start.yml # hdfs_datanode_init -- import_playbook: ../hdfs_httpfs_start.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_start.yml # hdfs_httpfs_init -- import_playbook: ../hdfs_ranger_init.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_init.yml # hdfs_client_init -- import_playbook: ../hdfs_audit_init.yml +- ansible.builtin.import_playbook: ../hdfs_audit_init.yml # hdfs_start # hdfs_init -- import_playbook: ../yarn_apptimelineserver_config.yml -- import_playbook: ../yarn_hdfs_init.yml -- import_playbook: ../yarn_jmx-exporter_config.yml -- import_playbook: ../yarn_apptimelineserver_start.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_config.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_start.yml -- import_playbook: ../yarn_nodemanager_config.yml -- import_playbook: ../yarn_resourcemanager_config.yml -- import_playbook: ../yarn_client_config.yml -- import_playbook: ../yarn_ranger_config.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_config.yml +- ansible.builtin.import_playbook: ../yarn_hdfs_init.yml +- ansible.builtin.import_playbook: ../yarn_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_start.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_config.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_start.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_config.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_config.yml +- ansible.builtin.import_playbook: ../yarn_client_config.yml +- ansible.builtin.import_playbook: ../yarn_ranger_config.yml # yarn_config -- import_playbook: ../yarn_ranger_init.yml -- import_playbook: ../yarn_resourcemanager_start.yml -- import_playbook: ../yarn_nodemanager_start.yml +- ansible.builtin.import_playbook: ../yarn_ranger_init.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_start.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_start.yml # yarn_client_init # yarn_start # yarn_init -- import_playbook: ../hive_client_config.yml +- ansible.builtin.import_playbook: ../hive_client_config.yml # hive_client_init -- import_playbook: ../hive_hdfs_init.yml -- import_playbook: ../hive_jmx-exporter_config.yml -- import_playbook: ../hive_metastore_config.yml -- import_playbook: ../hive_init_schema.yml -- import_playbook: ../hive_metastore_start.yml -- import_playbook: ../hbase_client_config.yml -- import_playbook: ../hive_hiveserver2_config.yml -- import_playbook: ../hive_ranger_config.yml +- ansible.builtin.import_playbook: ../hive_hdfs_init.yml +- ansible.builtin.import_playbook: ../hive_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hive_metastore_config.yml +- ansible.builtin.import_playbook: ../hive_init_schema.yml +- ansible.builtin.import_playbook: ../hive_metastore_start.yml +- ansible.builtin.import_playbook: ../hbase_client_config.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_config.yml +- ansible.builtin.import_playbook: ../hive_ranger_config.yml # hive_config -- import_playbook: ../hive_ranger_init.yml -- import_playbook: ../hive_hiveserver2_start.yml +- ansible.builtin.import_playbook: ../hive_ranger_init.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_start.yml # hive_hiveserver2_init # hive_start # hive_init -- import_playbook: ../hbase_hdfs_init.yml -- import_playbook: ../hbase_jmx-exporter_config.yml -- import_playbook: ../hbase_master_config.yml +- ansible.builtin.import_playbook: ../hbase_hdfs_init.yml +- ansible.builtin.import_playbook: ../hbase_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hbase_master_config.yml # hbase_phoenix_client_config -- import_playbook: ../hbase_phoenix_queryserver_client_config.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_config.yml -- import_playbook: ../hbase_regionserver_config.yml -- import_playbook: ../hbase_ranger_config.yml -- import_playbook: ../hbase_master_start.yml -- import_playbook: ../hbase_ranger_init.yml -- import_playbook: ../hbase_phoenix_ranger_init.yml -- import_playbook: ../hbase_regionserver_start.yml -- import_playbook: ../hbase_rest_config.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_client_config.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_config.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_config.yml +- ansible.builtin.import_playbook: ../hbase_ranger_config.yml +- ansible.builtin.import_playbook: ../hbase_master_start.yml +- ansible.builtin.import_playbook: ../hbase_ranger_init.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_ranger_init.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_start.yml +- ansible.builtin.import_playbook: ../hbase_rest_config.yml # hbase_config -- import_playbook: ../hbase_rest_start.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_start.yml +- ansible.builtin.import_playbook: ../hbase_rest_start.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_start.yml # hbase_start # hbase_init -- import_playbook: ../spark_client_config.yml -- import_playbook: ../spark_hdfs_init.yml -- import_playbook: ../spark_historyserver_config.yml +- ansible.builtin.import_playbook: ../spark_client_config.yml +- ansible.builtin.import_playbook: ../spark_hdfs_init.yml +- ansible.builtin.import_playbook: ../spark_historyserver_config.yml # spark_config # spark_historyserver_init -- import_playbook: ../spark_jmx-exporter_config.yml -- import_playbook: ../spark_historyserver_start.yml +- ansible.builtin.import_playbook: ../spark_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../spark_historyserver_start.yml # spark_start # spark_init -- import_playbook: ../spark3_client_config.yml -- import_playbook: ../spark3_hdfs_init.yml -- import_playbook: ../spark3_historyserver_config.yml +- ansible.builtin.import_playbook: ../spark3_client_config.yml +- ansible.builtin.import_playbook: ../spark3_hdfs_init.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_config.yml # spark3_config # spark3_historyserver_init -- import_playbook: ../spark3_jmx-exporter_config.yml -- import_playbook: ../spark3_historyserver_start.yml +- ansible.builtin.import_playbook: ../spark3_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_start.yml # spark3_start # spark3_init -- import_playbook: ../knox_gateway_config.yml -- import_playbook: ../knox_hdfs_init.yml -- import_playbook: ../knox_jmx-exporter_config.yml -- import_playbook: ../knox_ranger_config.yml +- ansible.builtin.import_playbook: ../knox_gateway_config.yml +- ansible.builtin.import_playbook: ../knox_hdfs_init.yml +- ansible.builtin.import_playbook: ../knox_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../knox_ranger_config.yml # knox_config -- import_playbook: ../knox_ranger_init.yml -- import_playbook: ../knox_gateway_start.yml +- ansible.builtin.import_playbook: ../knox_ranger_init.yml +- ansible.builtin.import_playbook: ../knox_gateway_start.yml # knox_start # knox_init # tdp-cluster_start diff --git a/playbooks/meta/all_per_service.yml b/playbooks/meta/all_per_service.yml index 935f8737..52a9a571 100644 --- a/playbooks/meta/all_per_service.yml +++ b/playbooks/meta/all_per_service.yml @@ -3,14 +3,14 @@ --- # tdp-cluster -- import_playbook: exporter.yml -- import_playbook: zookeeper.yml -- import_playbook: hadoop.yml -- import_playbook: ranger.yml -- import_playbook: hdfs.yml -- import_playbook: yarn.yml -- import_playbook: hbase.yml -- import_playbook: hive.yml -- import_playbook: spark.yml -- import_playbook: spark3.yml -- import_playbook: knox.yml +- ansible.builtin.import_playbook: exporter.yml +- ansible.builtin.import_playbook: zookeeper.yml +- ansible.builtin.import_playbook: hadoop.yml +- ansible.builtin.import_playbook: ranger.yml +- ansible.builtin.import_playbook: hdfs.yml +- ansible.builtin.import_playbook: yarn.yml +- ansible.builtin.import_playbook: hbase.yml +- ansible.builtin.import_playbook: hive.yml +- ansible.builtin.import_playbook: spark.yml +- ansible.builtin.import_playbook: spark3.yml +- ansible.builtin.import_playbook: knox.yml diff --git a/playbooks/meta/exporter.yml b/playbooks/meta/exporter.yml index ae9a3919..cc129103 100644 --- a/playbooks/meta/exporter.yml +++ b/playbooks/meta/exporter.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../exporter_jmx_install.yml +- ansible.builtin.import_playbook: ../exporter_jmx_install.yml # exporter_install # exporter_jmx_config # exporter_config diff --git a/playbooks/meta/hadoop.yml b/playbooks/meta/hadoop.yml index 21fb65ac..5832db0d 100644 --- a/playbooks/meta/hadoop.yml +++ b/playbooks/meta/hadoop.yml @@ -2,9 +2,9 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../hadoop_client_install.yml +- ansible.builtin.import_playbook: ../hadoop_client_install.yml # hadoop_install -- import_playbook: ../hadoop_client_config.yml +- ansible.builtin.import_playbook: ../hadoop_client_config.yml # hadoop_config # hadoop_start # hadoop_init diff --git a/playbooks/meta/hbase.yml b/playbooks/meta/hbase.yml index b930a5d7..6880aea5 100644 --- a/playbooks/meta/hbase.yml +++ b/playbooks/meta/hbase.yml @@ -2,36 +2,36 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../hbase_client_install.yml -- import_playbook: ../hbase_master_install.yml -- import_playbook: ../hbase_phoenix_client_install.yml -- import_playbook: ../hbase_phoenix_queryserver_client_install.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_install.yml -- import_playbook: ../hbase_phoenix_kerberos_install.yml -- import_playbook: ../hbase_phoenix_ssl-tls_install.yml -- import_playbook: ../hbase_ranger_install.yml -- import_playbook: ../hbase_regionserver_install.yml -- import_playbook: ../hbase_phoenix_coprocessor_install.yml -- import_playbook: ../hbase_rest_install.yml -- import_playbook: ../hbase_kerberos_install.yml -- import_playbook: ../hbase_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hbase_client_install.yml +- ansible.builtin.import_playbook: ../hbase_master_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_client_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_client_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_kerberos_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hbase_ranger_install.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_install.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_coprocessor_install.yml +- ansible.builtin.import_playbook: ../hbase_rest_install.yml +- ansible.builtin.import_playbook: ../hbase_kerberos_install.yml +- ansible.builtin.import_playbook: ../hbase_ssl-tls_install.yml # hbase_install -- import_playbook: ../hbase_client_config.yml -- import_playbook: ../hbase_hdfs_init.yml -- import_playbook: ../hbase_jmx-exporter_config.yml -- import_playbook: ../hbase_master_config.yml +- ansible.builtin.import_playbook: ../hbase_client_config.yml +- ansible.builtin.import_playbook: ../hbase_hdfs_init.yml +- ansible.builtin.import_playbook: ../hbase_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hbase_master_config.yml # hbase_phoenix_client_config -- import_playbook: ../hbase_phoenix_queryserver_client_config.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_config.yml -- import_playbook: ../hbase_regionserver_config.yml -- import_playbook: ../hbase_ranger_config.yml -- import_playbook: ../hbase_master_start.yml -- import_playbook: ../hbase_ranger_init.yml -- import_playbook: ../hbase_phoenix_ranger_init.yml -- import_playbook: ../hbase_regionserver_start.yml -- import_playbook: ../hbase_rest_config.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_client_config.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_config.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_config.yml +- ansible.builtin.import_playbook: ../hbase_ranger_config.yml +- ansible.builtin.import_playbook: ../hbase_master_start.yml +- ansible.builtin.import_playbook: ../hbase_ranger_init.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_ranger_init.yml +- ansible.builtin.import_playbook: ../hbase_regionserver_start.yml +- ansible.builtin.import_playbook: ../hbase_rest_config.yml # hbase_config -- import_playbook: ../hbase_rest_start.yml -- import_playbook: ../hbase_phoenix_queryserver_daemon_start.yml +- ansible.builtin.import_playbook: ../hbase_rest_start.yml +- ansible.builtin.import_playbook: ../hbase_phoenix_queryserver_daemon_start.yml # hbase_start # hbase_init diff --git a/playbooks/meta/hdfs.yml b/playbooks/meta/hdfs.yml index 56a2c103..4ee6dbe5 100644 --- a/playbooks/meta/hdfs.yml +++ b/playbooks/meta/hdfs.yml @@ -2,34 +2,34 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../hdfs_client_install.yml -- import_playbook: ../hdfs_datanode_install.yml -- import_playbook: ../hdfs_httpfs_install.yml -- import_playbook: ../hdfs_journalnode_install.yml -- import_playbook: ../hdfs_namenode_install.yml -- import_playbook: ../hdfs_kerberos_install.yml -- import_playbook: ../hdfs_ranger_install.yml -- import_playbook: ../hdfs_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hdfs_client_install.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_install.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_install.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_install.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_install.yml +- ansible.builtin.import_playbook: ../hdfs_kerberos_install.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_install.yml +- ansible.builtin.import_playbook: ../hdfs_ssl-tls_install.yml # hdfs_install -- import_playbook: ../hdfs_datanode_config.yml -- import_playbook: ../hdfs_httpfs_config.yml -- import_playbook: ../hdfs_jmx-exporter_config.yml -- import_playbook: ../hdfs_journalnode_config.yml -- import_playbook: ../hdfs_namenode_config.yml -- import_playbook: ../hdfs_client_config.yml -- import_playbook: ../hdfs_namenode_formatzk.yml -- import_playbook: ../hdfs_journalnode_start.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_config.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_config.yml +- ansible.builtin.import_playbook: ../hdfs_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_config.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_config.yml +- ansible.builtin.import_playbook: ../hdfs_client_config.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_formatzk.yml +- ansible.builtin.import_playbook: ../hdfs_journalnode_start.yml # hdfs_journalnode_init -- import_playbook: ../hdfs_ranger_config.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_config.yml # hdfs_config -- import_playbook: ../hdfs_namenode_start.yml +- ansible.builtin.import_playbook: ../hdfs_namenode_start.yml # hdfs_namenode_init -- import_playbook: ../hdfs_datanode_start.yml +- ansible.builtin.import_playbook: ../hdfs_datanode_start.yml # hdfs_datanode_init -- import_playbook: ../hdfs_httpfs_start.yml +- ansible.builtin.import_playbook: ../hdfs_httpfs_start.yml # hdfs_httpfs_init -- import_playbook: ../hdfs_ranger_init.yml +- ansible.builtin.import_playbook: ../hdfs_ranger_init.yml # hdfs_client_init -- import_playbook: ../hdfs_audit_init.yml +- ansible.builtin.import_playbook: ../hdfs_audit_init.yml # hdfs_start # hdfs_init diff --git a/playbooks/meta/hive.yml b/playbooks/meta/hive.yml index ad60aa35..339318d8 100644 --- a/playbooks/meta/hive.yml +++ b/playbooks/meta/hive.yml @@ -2,25 +2,25 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../hive_client_install.yml -- import_playbook: ../hive_hiveserver2_install.yml -- import_playbook: ../hive_metastore_install.yml -- import_playbook: ../hive_kerberos_install.yml -- import_playbook: ../hive_ranger_install.yml -- import_playbook: ../hive_ssl-tls_install.yml -- import_playbook: ../hive_install.yml -- import_playbook: ../hive_client_config.yml +- ansible.builtin.import_playbook: ../hive_client_install.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_install.yml +- ansible.builtin.import_playbook: ../hive_metastore_install.yml +- ansible.builtin.import_playbook: ../hive_kerberos_install.yml +- ansible.builtin.import_playbook: ../hive_ranger_install.yml +- ansible.builtin.import_playbook: ../hive_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../hive_install.yml +- ansible.builtin.import_playbook: ../hive_client_config.yml # hive_client_init -- import_playbook: ../hive_hdfs_init.yml -- import_playbook: ../hive_jmx-exporter_config.yml -- import_playbook: ../hive_metastore_config.yml -- import_playbook: ../hive_init_schema.yml -- import_playbook: ../hive_metastore_start.yml -- import_playbook: ../hive_hiveserver2_config.yml -- import_playbook: ../hive_ranger_config.yml +- ansible.builtin.import_playbook: ../hive_hdfs_init.yml +- ansible.builtin.import_playbook: ../hive_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../hive_metastore_config.yml +- ansible.builtin.import_playbook: ../hive_init_schema.yml +- ansible.builtin.import_playbook: ../hive_metastore_start.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_config.yml +- ansible.builtin.import_playbook: ../hive_ranger_config.yml # hive_config -- import_playbook: ../hive_ranger_init.yml -- import_playbook: ../hive_hiveserver2_start.yml +- ansible.builtin.import_playbook: ../hive_ranger_init.yml +- ansible.builtin.import_playbook: ../hive_hiveserver2_start.yml # hive_hiveserver2_init # hive_start # hive_init diff --git a/playbooks/meta/knox.yml b/playbooks/meta/knox.yml index 4562e83b..300ab27d 100644 --- a/playbooks/meta/knox.yml +++ b/playbooks/meta/knox.yml @@ -2,17 +2,17 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../knox_gateway_install.yml -- import_playbook: ../knox_kerberos_install.yml -- import_playbook: ../knox_ranger_install.yml -- import_playbook: ../knox_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../knox_gateway_install.yml +- ansible.builtin.import_playbook: ../knox_kerberos_install.yml +- ansible.builtin.import_playbook: ../knox_ranger_install.yml +- ansible.builtin.import_playbook: ../knox_ssl-tls_install.yml # knox_install -- import_playbook: ../knox_gateway_config.yml -- import_playbook: ../knox_hdfs_init.yml -- import_playbook: ../knox_jmx-exporter_config.yml -- import_playbook: ../knox_ranger_config.yml +- ansible.builtin.import_playbook: ../knox_gateway_config.yml +- ansible.builtin.import_playbook: ../knox_hdfs_init.yml +- ansible.builtin.import_playbook: ../knox_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../knox_ranger_config.yml # knox_config -- import_playbook: ../knox_ranger_init.yml -- import_playbook: ../knox_gateway_start.yml +- ansible.builtin.import_playbook: ../knox_ranger_init.yml +- ansible.builtin.import_playbook: ../knox_gateway_start.yml # knox_start # knox_init diff --git a/playbooks/meta/ranger.yml b/playbooks/meta/ranger.yml index 5f84f4cb..0dc480d3 100644 --- a/playbooks/meta/ranger.yml +++ b/playbooks/meta/ranger.yml @@ -2,24 +2,24 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../ranger_admin_install.yml -- import_playbook: ../ranger_kms_install.yml -- import_playbook: ../ranger_solr_install.yml -- import_playbook: ../ranger_solr_start.yml -- import_playbook: ../ranger_solr_init.yml -- import_playbook: ../ranger_usersync_install.yml -- import_playbook: ../ranger_kerberos_install.yml -- import_playbook: ../ranger_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../ranger_admin_install.yml +- ansible.builtin.import_playbook: ../ranger_kms_install.yml +- ansible.builtin.import_playbook: ../ranger_solr_install.yml +- ansible.builtin.import_playbook: ../ranger_solr_start.yml +- ansible.builtin.import_playbook: ../ranger_solr_init.yml +- ansible.builtin.import_playbook: ../ranger_usersync_install.yml +- ansible.builtin.import_playbook: ../ranger_kerberos_install.yml +- ansible.builtin.import_playbook: ../ranger_ssl-tls_install.yml # ranger_install -- import_playbook: ../ranger_admin_config.yml -- import_playbook: ../ranger_jmx-exporter_config.yml -- import_playbook: ../ranger_admin_start.yml +- ansible.builtin.import_playbook: ../ranger_admin_config.yml +- ansible.builtin.import_playbook: ../ranger_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../ranger_admin_start.yml # ranger_admin_init -- import_playbook: ../ranger_kms_config.yml -- import_playbook: ../ranger_kms_start.yml -- import_playbook: ../ranger_kms_init.yml -- import_playbook: ../ranger_usersync_config.yml +- ansible.builtin.import_playbook: ../ranger_kms_config.yml +- ansible.builtin.import_playbook: ../ranger_kms_start.yml +- ansible.builtin.import_playbook: ../ranger_kms_init.yml +- ansible.builtin.import_playbook: ../ranger_usersync_config.yml # ranger_config -- import_playbook: ../ranger_usersync_start.yml +- ansible.builtin.import_playbook: ../ranger_usersync_start.yml # ranger_start # ranger_init diff --git a/playbooks/meta/spark.yml b/playbooks/meta/spark.yml index 53d5325f..bdc7a116 100644 --- a/playbooks/meta/spark.yml +++ b/playbooks/meta/spark.yml @@ -2,17 +2,17 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../spark_client_install.yml -- import_playbook: ../spark_historyserver_install.yml -- import_playbook: ../spark_kerberos_install.yml -- import_playbook: ../spark_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../spark_client_install.yml +- ansible.builtin.import_playbook: ../spark_historyserver_install.yml +- ansible.builtin.import_playbook: ../spark_kerberos_install.yml +- ansible.builtin.import_playbook: ../spark_ssl-tls_install.yml # spark_install -- import_playbook: ../spark_client_config.yml -- import_playbook: ../spark_hdfs_init.yml -- import_playbook: ../spark_historyserver_config.yml +- ansible.builtin.import_playbook: ../spark_client_config.yml +- ansible.builtin.import_playbook: ../spark_hdfs_init.yml +- ansible.builtin.import_playbook: ../spark_historyserver_config.yml # spark_config # spark_historyserver_init -- import_playbook: ../spark_jmx-exporter_config.yml -- import_playbook: ../spark_historyserver_start.yml +- ansible.builtin.import_playbook: ../spark_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../spark_historyserver_start.yml # spark_start # spark_init diff --git a/playbooks/meta/spark3.yml b/playbooks/meta/spark3.yml index 142a8686..080e9388 100644 --- a/playbooks/meta/spark3.yml +++ b/playbooks/meta/spark3.yml @@ -2,17 +2,17 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../spark3_client_install.yml -- import_playbook: ../spark3_historyserver_install.yml -- import_playbook: ../spark3_kerberos_install.yml -- import_playbook: ../spark3_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../spark3_client_install.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_install.yml +- ansible.builtin.import_playbook: ../spark3_kerberos_install.yml +- ansible.builtin.import_playbook: ../spark3_ssl-tls_install.yml # spark3_install -- import_playbook: ../spark3_client_config.yml -- import_playbook: ../spark3_hdfs_init.yml -- import_playbook: ../spark3_historyserver_config.yml +- ansible.builtin.import_playbook: ../spark3_client_config.yml +- ansible.builtin.import_playbook: ../spark3_hdfs_init.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_config.yml # spark3_config # spark3_historyserver_init -- import_playbook: ../spark3_jmx-exporter_config.yml -- import_playbook: ../spark3_historyserver_start.yml +- ansible.builtin.import_playbook: ../spark3_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../spark3_historyserver_start.yml # spark3_start # spark3_init diff --git a/playbooks/meta/yarn.yml b/playbooks/meta/yarn.yml index 42ab2523..e9659d7b 100644 --- a/playbooks/meta/yarn.yml +++ b/playbooks/meta/yarn.yml @@ -2,29 +2,29 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../yarn_apptimelineserver_install.yml -- import_playbook: ../yarn_client_install.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_install.yml -- import_playbook: ../yarn_nodemanager_install.yml -- import_playbook: ../yarn_ranger_install.yml -- import_playbook: ../yarn_resourcemanager_install.yml -- import_playbook: ../yarn_kerberos_install.yml -- import_playbook: ../yarn_ssl-tls_install.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_install.yml +- ansible.builtin.import_playbook: ../yarn_client_install.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_install.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_install.yml +- ansible.builtin.import_playbook: ../yarn_ranger_install.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_install.yml +- ansible.builtin.import_playbook: ../yarn_kerberos_install.yml +- ansible.builtin.import_playbook: ../yarn_ssl-tls_install.yml # yarn_install -- import_playbook: ../yarn_apptimelineserver_config.yml -- import_playbook: ../yarn_hdfs_init.yml -- import_playbook: ../yarn_jmx-exporter_config.yml -- import_playbook: ../yarn_apptimelineserver_start.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_config.yml -- import_playbook: ../yarn_mapred_jobhistoryserver_start.yml -- import_playbook: ../yarn_nodemanager_config.yml -- import_playbook: ../yarn_resourcemanager_config.yml -- import_playbook: ../yarn_client_config.yml -- import_playbook: ../yarn_ranger_config.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_config.yml +- ansible.builtin.import_playbook: ../yarn_hdfs_init.yml +- ansible.builtin.import_playbook: ../yarn_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../yarn_apptimelineserver_start.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_config.yml +- ansible.builtin.import_playbook: ../yarn_mapred_jobhistoryserver_start.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_config.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_config.yml +- ansible.builtin.import_playbook: ../yarn_client_config.yml +- ansible.builtin.import_playbook: ../yarn_ranger_config.yml # yarn_config -- import_playbook: ../yarn_ranger_init.yml -- import_playbook: ../yarn_resourcemanager_start.yml -- import_playbook: ../yarn_nodemanager_start.yml +- ansible.builtin.import_playbook: ../yarn_ranger_init.yml +- ansible.builtin.import_playbook: ../yarn_resourcemanager_start.yml +- ansible.builtin.import_playbook: ../yarn_nodemanager_start.yml # yarn_client_init # yarn_start # yarn_init diff --git a/playbooks/meta/zookeeper.yml b/playbooks/meta/zookeeper.yml index 3d4ef2b2..727a2ce5 100644 --- a/playbooks/meta/zookeeper.yml +++ b/playbooks/meta/zookeeper.yml @@ -2,15 +2,15 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ../zookeeper_client_install.yml -- import_playbook: ../zookeeper_server_install.yml -- import_playbook: ../zookeeper_kerberos_install.yml +- ansible.builtin.import_playbook: ../zookeeper_client_install.yml +- ansible.builtin.import_playbook: ../zookeeper_server_install.yml +- ansible.builtin.import_playbook: ../zookeeper_kerberos_install.yml # zookeeper_install -- import_playbook: ../zookeeper_client_config.yml -- import_playbook: ../zookeeper_jmx-exporter_config.yml -- import_playbook: ../zookeeper_server_config.yml +- ansible.builtin.import_playbook: ../zookeeper_client_config.yml +- ansible.builtin.import_playbook: ../zookeeper_jmx-exporter_config.yml +- ansible.builtin.import_playbook: ../zookeeper_server_config.yml # zookeeper_config -- import_playbook: ../zookeeper_server_start.yml +- ansible.builtin.import_playbook: ../zookeeper_server_start.yml # zookeeper_server_init # zookeeper_start # zookeeper_init diff --git a/playbooks/ranger_admin_config.yml b/playbooks/ranger_admin_config.yml index 70da66c4..e5872803 100644 --- a/playbooks/ranger_admin_config.yml +++ b/playbooks/ranger_admin_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Configure Ranger Admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_admin_install.yml b/playbooks/ranger_admin_install.yml index ac702777..134be0c1 100644 --- a/playbooks/ranger_admin_install.yml +++ b/playbooks/ranger_admin_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Install Ranger Admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_admin_restart.yml b/playbooks/ranger_admin_restart.yml index 99d17984..d7e74691 100644 --- a/playbooks/ranger_admin_restart.yml +++ b/playbooks/ranger_admin_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Restart Ranger Admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_admin_start.yml b/playbooks/ranger_admin_start.yml index 640c1555..f0ccaa07 100644 --- a/playbooks/ranger_admin_start.yml +++ b/playbooks/ranger_admin_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Start Ranger Admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_admin_status.yml b/playbooks/ranger_admin_status.yml index 47c6718c..9f428ed4 100644 --- a/playbooks/ranger_admin_status.yml +++ b/playbooks/ranger_admin_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Ranger Admin status - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_admin_stop.yml b/playbooks/ranger_admin_stop.yml index 72850eda..e541273e 100644 --- a/playbooks/ranger_admin_stop.yml +++ b/playbooks/ranger_admin_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Stop Ranger Admin - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_jmx-exporter_config.yml b/playbooks/ranger_jmx-exporter_config.yml index 37af358f..b5756933 100644 --- a/playbooks/ranger_jmx-exporter_config.yml +++ b/playbooks/ranger_jmx-exporter_config.yml @@ -8,27 +8,27 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_jmx-exporter - name: Configure Ranger Admin jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Ranger UserSync config hosts: ranger_usersync tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_jmx-exporter - name: Configure Ranger UserSync jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Ranger KMS config hosts: ranger_kms tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_jmx-exporter - name: Configure Ranger KMS jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kerberos_install.yml b/playbooks/ranger_kerberos_install.yml index 7cff2fbf..3ac85cd7 100644 --- a/playbooks/ranger_kerberos_install.yml +++ b/playbooks/ranger_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kerberos - name: Install Ranger Admin Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Ranger UserSync install hosts: ranger_usersync strategy: linear @@ -20,10 +20,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kerberos - name: Install Ranger UserSync Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Ranger KMS install hosts: ranger_kms strategy: linear @@ -31,7 +31,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kerberos - name: Install Ranger KMS Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_config.yml b/playbooks/ranger_kms_config.yml index 35362ff1..58c65617 100644 --- a/playbooks/ranger_kms_config.yml +++ b/playbooks/ranger_kms_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Configure Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_init.yml b/playbooks/ranger_kms_init.yml index 570107bb..cbac32a9 100644 --- a/playbooks/ranger_kms_init.yml +++ b/playbooks/ranger_kms_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Initialize Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_install.yml b/playbooks/ranger_kms_install.yml index de435d51..f52bbd03 100644 --- a/playbooks/ranger_kms_install.yml +++ b/playbooks/ranger_kms_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Install Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_restart.yml b/playbooks/ranger_kms_restart.yml index e09f87c0..dd7141d0 100644 --- a/playbooks/ranger_kms_restart.yml +++ b/playbooks/ranger_kms_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Restart Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_ssl-tls.yml b/playbooks/ranger_kms_ssl-tls.yml index 4aa34f71..afc5c23b 100644 --- a/playbooks/ranger_kms_ssl-tls.yml +++ b/playbooks/ranger_kms_ssl-tls.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Install Ranger KMS SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_start.yml b/playbooks/ranger_kms_start.yml index f09e1286..c7d8abf1 100644 --- a/playbooks/ranger_kms_start.yml +++ b/playbooks/ranger_kms_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Start Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_status.yml b/playbooks/ranger_kms_status.yml index 7d2a11e3..c1306d80 100644 --- a/playbooks/ranger_kms_status.yml +++ b/playbooks/ranger_kms_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Ranger KMS status - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_kms_stop.yml b/playbooks/ranger_kms_stop.yml index aadadcda..fe67b0da 100644 --- a/playbooks/ranger_kms_stop.yml +++ b/playbooks/ranger_kms_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_kms - name: Stop Ranger KMS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_init.yml b/playbooks/ranger_solr_init.yml index 61b4c823..c5860a9a 100644 --- a/playbooks/ranger_solr_init.yml +++ b/playbooks/ranger_solr_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Initialize Ranger Solr - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_install.yml b/playbooks/ranger_solr_install.yml index 029cad29..3cbf9c06 100644 --- a/playbooks/ranger_solr_install.yml +++ b/playbooks/ranger_solr_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Install Ranger Solr - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_restart.yml b/playbooks/ranger_solr_restart.yml index 2b71529c..b40a444d 100644 --- a/playbooks/ranger_solr_restart.yml +++ b/playbooks/ranger_solr_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Restart Ranger Solr - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_start.yml b/playbooks/ranger_solr_start.yml index ce861f90..cfe4f860 100644 --- a/playbooks/ranger_solr_start.yml +++ b/playbooks/ranger_solr_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Start Ranger Solr - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_status.yml b/playbooks/ranger_solr_status.yml index 35aad9f1..ba36ad23 100644 --- a/playbooks/ranger_solr_status.yml +++ b/playbooks/ranger_solr_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Ranger Solr status - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_solr_stop.yml b/playbooks/ranger_solr_stop.yml index e1e977ad..b29e6df6 100644 --- a/playbooks/ranger_solr_stop.yml +++ b/playbooks/ranger_solr_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_solr - name: Stop Ranger Solr - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.solr tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_ssl-tls_install.yml b/playbooks/ranger_ssl-tls_install.yml index 2b07d864..c8c64fcb 100644 --- a/playbooks/ranger_ssl-tls_install.yml +++ b/playbooks/ranger_ssl-tls_install.yml @@ -8,26 +8,26 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - name: Install Ranger Admin SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.admin tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Ranger UserSync install hosts: ranger_usersync tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Install Ranger UserSync SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Ranger KMS install hosts: ranger_kms tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_ssl-tls - name: Install Ranger KMS SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.kms tasks_from: ssl-tls diff --git a/playbooks/ranger_usersync_config.yml b/playbooks/ranger_usersync_config.yml index 1c0d065a..d9a3f1f7 100644 --- a/playbooks/ranger_usersync_config.yml +++ b/playbooks/ranger_usersync_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Configure Ranger UserSync - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_usersync_install.yml b/playbooks/ranger_usersync_install.yml index 8cbe411b..1467d745 100644 --- a/playbooks/ranger_usersync_install.yml +++ b/playbooks/ranger_usersync_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Install Ranger UserSync - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_usersync_restart.yml b/playbooks/ranger_usersync_restart.yml index d5f978cb..ed1d6849 100644 --- a/playbooks/ranger_usersync_restart.yml +++ b/playbooks/ranger_usersync_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Restart Ranger UserSync - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_usersync_start.yml b/playbooks/ranger_usersync_start.yml index 135c75c4..9ce4aa7a 100644 --- a/playbooks/ranger_usersync_start.yml +++ b/playbooks/ranger_usersync_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Start Ranger UserSync - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_usersync_status.yml b/playbooks/ranger_usersync_status.yml index d2079aae..cf6a0e76 100644 --- a/playbooks/ranger_usersync_status.yml +++ b/playbooks/ranger_usersync_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Ranger UserSync status - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/ranger_usersync_stop.yml b/playbooks/ranger_usersync_stop.yml index 0daaf579..09912fcd 100644 --- a/playbooks/ranger_usersync_stop.yml +++ b/playbooks/ranger_usersync_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_usersync - name: Stop Ranger UserSync - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.usersync tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/restart_all.yml b/playbooks/restart_all.yml index 7c4eaeb2..da9c0ff2 100644 --- a/playbooks/restart_all.yml +++ b/playbooks/restart_all.yml @@ -2,12 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: restart_zookeeper.yml -- import_playbook: restart_hdfs.yml -- import_playbook: restart_yarn.yml -- import_playbook: restart_hbase.yml -- import_playbook: restart_ranger.yml -- import_playbook: restart_hive.yml -- import_playbook: restart_spark.yml -- import_playbook: restart_spark3.yml -- import_playbook: restart_knox.yml +- ansible.builtin.import_playbook: restart_zookeeper.yml +- ansible.builtin.import_playbook: restart_hdfs.yml +- ansible.builtin.import_playbook: restart_yarn.yml +- ansible.builtin.import_playbook: restart_hbase.yml +- ansible.builtin.import_playbook: restart_ranger.yml +- ansible.builtin.import_playbook: restart_hive.yml +- ansible.builtin.import_playbook: restart_spark.yml +- ansible.builtin.import_playbook: restart_spark3.yml +- ansible.builtin.import_playbook: restart_knox.yml diff --git a/playbooks/restart_hbase.yml b/playbooks/restart_hbase.yml index d26c1695..20cb4c84 100644 --- a/playbooks/restart_hbase.yml +++ b/playbooks/restart_hbase.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: hbase_master_restart.yml -- import_playbook: hbase_regionserver_restart.yml -- import_playbook: hbase_rest_restart.yml -- import_playbook: hbase_phoenix_queryserver_daemon_restart.yml +- ansible.builtin.import_playbook: hbase_master_restart.yml +- ansible.builtin.import_playbook: hbase_regionserver_restart.yml +- ansible.builtin.import_playbook: hbase_rest_restart.yml +- ansible.builtin.import_playbook: hbase_phoenix_queryserver_daemon_restart.yml diff --git a/playbooks/restart_hdfs.yml b/playbooks/restart_hdfs.yml index bc079832..e55281ca 100644 --- a/playbooks/restart_hdfs.yml +++ b/playbooks/restart_hdfs.yml @@ -2,6 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: hdfs_namenode_restart.yml -- import_playbook: hdfs_journalnode_restart.yml -- import_playbook: hdfs_datanode_restart.yml +- ansible.builtin.import_playbook: hdfs_namenode_restart.yml +- ansible.builtin.import_playbook: hdfs_journalnode_restart.yml +- ansible.builtin.import_playbook: hdfs_datanode_restart.yml diff --git a/playbooks/restart_hive.yml b/playbooks/restart_hive.yml index 97598f8e..cd6818f6 100644 --- a/playbooks/restart_hive.yml +++ b/playbooks/restart_hive.yml @@ -2,5 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: hive_hiveserver2_restart.yml -- import_playbook: hive_metastore_restart.yml +- ansible.builtin.import_playbook: hive_hiveserver2_restart.yml +- ansible.builtin.import_playbook: hive_metastore_restart.yml diff --git a/playbooks/restart_knox.yml b/playbooks/restart_knox.yml index 9d4d48db..5a245ea4 100644 --- a/playbooks/restart_knox.yml +++ b/playbooks/restart_knox.yml @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: knox_gateway_restart.yml +- ansible.builtin.import_playbook: knox_gateway_restart.yml diff --git a/playbooks/restart_ranger.yml b/playbooks/restart_ranger.yml index f165b3b3..543dfee6 100644 --- a/playbooks/restart_ranger.yml +++ b/playbooks/restart_ranger.yml @@ -2,5 +2,5 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: ranger_admin_restart.yml -- import_playbook: ranger_usersync_restart.yml +- ansible.builtin.import_playbook: ranger_admin_restart.yml +- ansible.builtin.import_playbook: ranger_usersync_restart.yml diff --git a/playbooks/restart_spark.yml b/playbooks/restart_spark.yml index 28f4795a..7e920b72 100644 --- a/playbooks/restart_spark.yml +++ b/playbooks/restart_spark.yml @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: spark_historyserver_restart.yml +- ansible.builtin.import_playbook: spark_historyserver_restart.yml diff --git a/playbooks/restart_spark3.yml b/playbooks/restart_spark3.yml index a42c9df7..24878c3d 100644 --- a/playbooks/restart_spark3.yml +++ b/playbooks/restart_spark3.yml @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: spark3_historyserver_restart.yml +- ansible.builtin.import_playbook: spark3_historyserver_restart.yml diff --git a/playbooks/restart_yarn.yml b/playbooks/restart_yarn.yml index 78c51d0d..dfe18098 100644 --- a/playbooks/restart_yarn.yml +++ b/playbooks/restart_yarn.yml @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: yarn_resourcemanager_restart.yml -- import_playbook: yarn_nodemanager_restart.yml -- import_playbook: yarn_apptimelineserver_restart.yml -- import_playbook: yarn_mapred_jobhistoryserver_restart.yml +- ansible.builtin.import_playbook: yarn_resourcemanager_restart.yml +- ansible.builtin.import_playbook: yarn_nodemanager_restart.yml +- ansible.builtin.import_playbook: yarn_apptimelineserver_restart.yml +- ansible.builtin.import_playbook: yarn_mapred_jobhistoryserver_restart.yml diff --git a/playbooks/restart_zookeeper.yml b/playbooks/restart_zookeeper.yml index 663efa61..e6c71ab6 100644 --- a/playbooks/restart_zookeeper.yml +++ b/playbooks/restart_zookeeper.yml @@ -2,4 +2,4 @@ # SPDX-License-Identifier: Apache-2.0 --- -- import_playbook: zookeeper_server_restart.yml +- ansible.builtin.import_playbook: zookeeper_server_restart.yml diff --git a/playbooks/spark3_client_config.yml b/playbooks/spark3_client_config.yml index 5aeb38c4..5273863b 100644 --- a/playbooks/spark3_client_config.yml +++ b/playbooks/spark3_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_client - name: Install Spark3 Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_client_install.yml b/playbooks/spark3_client_install.yml index fdae596f..9afce780 100644 --- a/playbooks/spark3_client_install.yml +++ b/playbooks/spark3_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_client - name: Install Spark3 Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_hdfs_init.yml b/playbooks/spark3_hdfs_init.yml index 94546573..0a7fead3 100644 --- a/playbooks/spark3_hdfs_init.yml +++ b/playbooks/spark3_hdfs_init.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_hdfs - name: Initialize Spark3 HDFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Post install steps for Spark3 - NameNode hosts: hdfs_nn @@ -21,7 +21,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_hdfs - name: Initialize Spark3 HDFS NN - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: hdfs_user - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_config.yml b/playbooks/spark3_historyserver_config.yml index 18dcf45b..c6aa745e 100644 --- a/playbooks/spark3_historyserver_config.yml +++ b/playbooks/spark3_historyserver_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Configure Spark3 History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_install.yml b/playbooks/spark3_historyserver_install.yml index 2bf0e238..0899cb00 100644 --- a/playbooks/spark3_historyserver_install.yml +++ b/playbooks/spark3_historyserver_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Install Spark3 History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_restart.yml b/playbooks/spark3_historyserver_restart.yml index fdbdd23a..8b6922ef 100644 --- a/playbooks/spark3_historyserver_restart.yml +++ b/playbooks/spark3_historyserver_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Restart Spark3 History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_start.yml b/playbooks/spark3_historyserver_start.yml index e81c5fc0..2ccd8d3a 100644 --- a/playbooks/spark3_historyserver_start.yml +++ b/playbooks/spark3_historyserver_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Start Spark3 History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_status.yml b/playbooks/spark3_historyserver_status.yml index 917d6bfa..db37a24a 100644 --- a/playbooks/spark3_historyserver_status.yml +++ b/playbooks/spark3_historyserver_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Spark3 History Server status - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_historyserver_stop.yml b/playbooks/spark3_historyserver_stop.yml index 1b4f2e8f..040704a9 100644 --- a/playbooks/spark3_historyserver_stop.yml +++ b/playbooks/spark3_historyserver_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Stop Spark3 History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_jmx-exporter_config.yml b/playbooks/spark3_jmx-exporter_config.yml index 66345021..e0891b96 100644 --- a/playbooks/spark3_jmx-exporter_config.yml +++ b/playbooks/spark3_jmx-exporter_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_jmx-exporter - name: Configure Spark3 History Server jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_kerberos_install.yml b/playbooks/spark3_kerberos_install.yml index 9e9e23f1..b229fd9d 100644 --- a/playbooks/spark3_kerberos_install.yml +++ b/playbooks/spark3_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_kerberos - name: Install Spark3 History Server Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Spark3 Kerberos Client install hosts: spark3_client @@ -21,7 +21,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_kerberos - name: Install Spark3 Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark3_ssl-tls_install.yml b/playbooks/spark3_ssl-tls_install.yml index 2dcdbcc0..83b4b9f7 100644 --- a/playbooks/spark3_ssl-tls_install.yml +++ b/playbooks/spark3_ssl-tls_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark3_historyserver - name: Install Spark3 History Server SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_client_config.yml b/playbooks/spark_client_config.yml index c2e96d40..730ffd8d 100644 --- a/playbooks/spark_client_config.yml +++ b/playbooks/spark_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_client - name: Configure Spark Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_client_install.yml b/playbooks/spark_client_install.yml index 06582387..fc356b65 100644 --- a/playbooks/spark_client_install.yml +++ b/playbooks/spark_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_client - name: Install Spark Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_hdfs_init.yml b/playbooks/spark_hdfs_init.yml index 4d9ecb5b..777fc4e2 100644 --- a/playbooks/spark_hdfs_init.yml +++ b/playbooks/spark_hdfs_init.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_hdfs - name: Initialize Spark HDFS - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Post install steps for Spark - NameNode hosts: hdfs_nn @@ -21,7 +21,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_hdfs - name: Initialize Spark HDFS NN - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: hdfs_user - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_config.yml b/playbooks/spark_historyserver_config.yml index 508526d9..0bf43cdc 100644 --- a/playbooks/spark_historyserver_config.yml +++ b/playbooks/spark_historyserver_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Configure Spark History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_install.yml b/playbooks/spark_historyserver_install.yml index 8817a4c6..161b2126 100644 --- a/playbooks/spark_historyserver_install.yml +++ b/playbooks/spark_historyserver_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Install Spark History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_restart.yml b/playbooks/spark_historyserver_restart.yml index 098884e4..0aee3884 100644 --- a/playbooks/spark_historyserver_restart.yml +++ b/playbooks/spark_historyserver_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Restart Spark History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_start.yml b/playbooks/spark_historyserver_start.yml index f635fd84..c34affaf 100644 --- a/playbooks/spark_historyserver_start.yml +++ b/playbooks/spark_historyserver_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Start Spark History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_status.yml b/playbooks/spark_historyserver_status.yml index be79720b..dfc98bae 100644 --- a/playbooks/spark_historyserver_status.yml +++ b/playbooks/spark_historyserver_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Spark History Server status - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_historyserver_stop.yml b/playbooks/spark_historyserver_stop.yml index d1733dc9..c7bd1a9d 100644 --- a/playbooks/spark_historyserver_stop.yml +++ b/playbooks/spark_historyserver_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_historyserver - name: Stop Spark History Server - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_jmx-exporter_config.yml b/playbooks/spark_jmx-exporter_config.yml index 36892f30..daebf32e 100644 --- a/playbooks/spark_jmx-exporter_config.yml +++ b/playbooks/spark_jmx-exporter_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_jmx-exporter - name: Configure Spark History Server jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_kerberos_install.yml b/playbooks/spark_kerberos_install.yml index a5ffb3be..b0de301f 100644 --- a/playbooks/spark_kerberos_install.yml +++ b/playbooks/spark_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_kerberos - name: Install Spark History Server Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Spark Kerberos Client install hosts: spark_client strategy: linear @@ -20,7 +20,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_kerberos - name: Install Spark Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/spark_ssl-tls_install.yml b/playbooks/spark_ssl-tls_install.yml index 3b9092b0..c232d97e 100644 --- a/playbooks/spark_ssl-tls_install.yml +++ b/playbooks/spark_ssl-tls_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: spark_history_server - name: Install Spark History Server SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.historyserver tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/tests/test_user_group.yml b/playbooks/tests/test_user_group.yml index 3fa1d87e..f7f8d41c 100644 --- a/playbooks/tests/test_user_group.yml +++ b/playbooks/tests/test_user_group.yml @@ -18,11 +18,11 @@ tasks: - name: Install openldap client - package: + ansible.builtin.package: name: openldap-clients - name: Create test group ldif - copy: + ansible.builtin.copy: content: | dn: cn={{ test_group }},{{ ldap_group_base }} objectClass: top @@ -32,7 +32,7 @@ dest: /tmp/testgroup.ldif - name: Apply test group ldif - command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testgroup.ldif" + ansible.builtin.command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testgroup.ldif" register: reg_ldapadd_user failed_when: | reg_ldapadd_user is failed and @@ -40,7 +40,7 @@ changed_when: reg_ldapadd_user.rc != 68 - name: Create test user ldif - copy: + ansible.builtin.copy: content: | dn: uid={{ test_user }},{{ ldap_user_base }} uid: {{ test_user }} @@ -55,7 +55,7 @@ dest: /tmp/testuser.ldif - name: Apply test group ldif - command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testuser.ldif" + ansible.builtin.command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testuser.ldif" register: reg_ldapadd_group failed_when: | reg_ldapadd_group is failed and @@ -63,34 +63,34 @@ changed_when: reg_ldapadd_group.rc != 68 - name: Check user - command: "id -u {{ test_user }}" + ansible.builtin.command: "id -u {{ test_user }}" changed_when: false register: reg_check_user - name: Check group - command: "id -ng {{ test_user }}" + ansible.builtin.command: "id -ng {{ test_user }}" changed_when: false register: reg_check_group - name: Assert that user is pulled from ldap to unix - assert: + ansible.builtin.assert: that: - reg_check_user.stdout == (test_uid | string) success_msg: User correctly pulled from ldap fail_msg: User not pulled from ldap. - name: Assert that group is pulled from ldap to unix - assert: + ansible.builtin.assert: that: - reg_check_group.stdout == test_group success_msg: Group correctly pulled from ldap fail_msg: Group not pulled from ldap. - name: Create Kerberos user - command: "kadmin -r {{ realm }} -p {{ kadmin_principal }} -w {{ kadmin_password }} -q \"addprinc -pw {{ test_password }} {{ test_user }}@{{ realm }}\"" + ansible.builtin.command: "kadmin -r {{ realm }} -p {{ kadmin_principal }} -w {{ kadmin_password }} -q \"addprinc -pw {{ test_password }} {{ test_user }}@{{ realm }}\"" - name: Get user keytab - shell: | + ansible.builtin.shell: | set timeout 10 spawn ktutil diff --git a/playbooks/utils/hdfs_user_homes.yml b/playbooks/utils/hdfs_user_homes.yml index 57dc75ca..64f5701a 100644 --- a/playbooks/utils/hdfs_user_homes.yml +++ b/playbooks/utils/hdfs_user_homes.yml @@ -8,6 +8,6 @@ tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_client - - import_role: + - ansible.builtin.import_role: name: tosit.tdp.utils.hdfs_user_homes - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/utils/ranger_policies.yml b/playbooks/utils/ranger_policies.yml index d6663acf..2f60096c 100644 --- a/playbooks/utils/ranger_policies.yml +++ b/playbooks/utils/ranger_policies.yml @@ -8,6 +8,6 @@ tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: ranger_admin - - import_role: + - ansible.builtin.import_role: name: tosit.tdp.utils.ranger_policies - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_config.yml b/playbooks/yarn_apptimelineserver_config.yml index 56a58d25..5c8665ff 100644 --- a/playbooks/yarn_apptimelineserver_config.yml +++ b/playbooks/yarn_apptimelineserver_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Configure YARN ATS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_install.yml b/playbooks/yarn_apptimelineserver_install.yml index d590ff1d..434b2e03 100644 --- a/playbooks/yarn_apptimelineserver_install.yml +++ b/playbooks/yarn_apptimelineserver_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Install YARN ATS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_restart.yml b/playbooks/yarn_apptimelineserver_restart.yml index 7ff8ba3c..64eee4c6 100644 --- a/playbooks/yarn_apptimelineserver_restart.yml +++ b/playbooks/yarn_apptimelineserver_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Restart YARN ATS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_start.yml b/playbooks/yarn_apptimelineserver_start.yml index 1ddee1e7..4a734dc4 100644 --- a/playbooks/yarn_apptimelineserver_start.yml +++ b/playbooks/yarn_apptimelineserver_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Start YARN ATS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_status.yml b/playbooks/yarn_apptimelineserver_status.yml index 4a318aa8..8ee93c5e 100644 --- a/playbooks/yarn_apptimelineserver_status.yml +++ b/playbooks/yarn_apptimelineserver_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: YARN ATS status - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_apptimelineserver_stop.yml b/playbooks/yarn_apptimelineserver_stop.yml index dbdecf98..0520328b 100644 --- a/playbooks/yarn_apptimelineserver_stop.yml +++ b/playbooks/yarn_apptimelineserver_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Stop YARN ATS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_client_config.yml b/playbooks/yarn_client_config.yml index 164fcd94..44b48181 100644 --- a/playbooks/yarn_client_config.yml +++ b/playbooks/yarn_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_client - name: Configure YARN Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_client_install.yml b/playbooks/yarn_client_install.yml index 07bf61a8..7207e7f1 100644 --- a/playbooks/yarn_client_install.yml +++ b/playbooks/yarn_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_client - name: Install YARN Client - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_hdfs_init.yml b/playbooks/yarn_hdfs_init.yml index c59dd7a2..ae81cba1 100644 --- a/playbooks/yarn_hdfs_init.yml +++ b/playbooks/yarn_hdfs_init.yml @@ -9,7 +9,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_hdfs - name: Initialize YARN hdfs - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.common tasks_from: hdfs_init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_jmx-exporter_config.yml b/playbooks/yarn_jmx-exporter_config.yml index 61aec8fc..34f97e75 100644 --- a/playbooks/yarn_jmx-exporter_config.yml +++ b/playbooks/yarn_jmx-exporter_config.yml @@ -8,10 +8,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_jmx-exporter - name: Configure YARN Resource Manager jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Yarn App Timeline Server config hosts: yarn_ats @@ -19,10 +19,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_jmx-exporter - name: Configure YARN App Timeline Server jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Yarn Node Manager config hosts: yarn_nm @@ -30,10 +30,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_jmx-exporter - name: Configure YARN Node Manager jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: jmx-exporter Mapred Job History Server config hosts: mapred_jhs @@ -41,7 +41,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_jmx-exporter - name: Configure YARN Mapred Job History Server jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_kerberos_install.yml b/playbooks/yarn_kerberos_install.yml index 63d5a0bf..f5d3c54b 100644 --- a/playbooks/yarn_kerberos_install.yml +++ b/playbooks/yarn_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_kerberos - name: Install YARN Resource Manager Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Nodemanager install hosts: yarn_nm strategy: linear @@ -20,10 +20,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_kerberos - name: Install YARN Node Manager Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos AppTimelineServer install hosts: yarn_ats strategy: linear @@ -31,10 +31,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_kerberos - name: Install YARN Application Timeline Server Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Job History Server install hosts: mapred_jhs strategy: linear @@ -42,10 +42,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_kerberos - name: Install YARN Mapred Job History Server Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Yarn Client install hosts: hadoop_client strategy: linear @@ -53,7 +53,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_kerberos - name: Install YARN Client Kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_config.yml b/playbooks/yarn_mapred_jobhistoryserver_config.yml index 4598b761..d02168c4 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_config.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Configure YARN Mapred JHS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_install.yml b/playbooks/yarn_mapred_jobhistoryserver_install.yml index d1a4373f..c36b55dc 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_install.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Install YARN Mapred JHS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_restart.yml b/playbooks/yarn_mapred_jobhistoryserver_restart.yml index 07e01bcd..ea7ddbc7 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_restart.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Restart YARN Mapred JHS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_start.yml b/playbooks/yarn_mapred_jobhistoryserver_start.yml index fd94440f..a6345ca5 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_start.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Start YARN Mapred JHS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_status.yml b/playbooks/yarn_mapred_jobhistoryserver_status.yml index 8a170c3c..e913a83e 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_status.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: YARN Mapred JHS status - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_mapred_jobhistoryserver_stop.yml b/playbooks/yarn_mapred_jobhistoryserver_stop.yml index db099b11..a3a37d49 100644 --- a/playbooks/yarn_mapred_jobhistoryserver_stop.yml +++ b/playbooks/yarn_mapred_jobhistoryserver_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Stop YARN Mapred JHS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_config.yml b/playbooks/yarn_nodemanager_config.yml index a2920a78..f0cddddf 100644 --- a/playbooks/yarn_nodemanager_config.yml +++ b/playbooks/yarn_nodemanager_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Configure YARN NM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_install.yml b/playbooks/yarn_nodemanager_install.yml index 40ec637b..f4214b96 100644 --- a/playbooks/yarn_nodemanager_install.yml +++ b/playbooks/yarn_nodemanager_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Install YARN NM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_restart.yml b/playbooks/yarn_nodemanager_restart.yml index 8e9a717e..caa3a919 100644 --- a/playbooks/yarn_nodemanager_restart.yml +++ b/playbooks/yarn_nodemanager_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Restart YARN NM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_start.yml b/playbooks/yarn_nodemanager_start.yml index 0584af70..3ffa27e4 100644 --- a/playbooks/yarn_nodemanager_start.yml +++ b/playbooks/yarn_nodemanager_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Start YARN NM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_status.yml b/playbooks/yarn_nodemanager_status.yml index 3e2181fc..3b1055d4 100644 --- a/playbooks/yarn_nodemanager_status.yml +++ b/playbooks/yarn_nodemanager_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: YARN NM status - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_nodemanager_stop.yml b/playbooks/yarn_nodemanager_stop.yml index 5ac7f697..0b825742 100644 --- a/playbooks/yarn_nodemanager_stop.yml +++ b/playbooks/yarn_nodemanager_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Stop YARN NM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_ranger_config.yml b/playbooks/yarn_ranger_config.yml index 927e1551..c75ea920 100644 --- a/playbooks/yarn_ranger_config.yml +++ b/playbooks/yarn_ranger_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_ranger - name: Configure YARN Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.ranger tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_ranger_init.yml b/playbooks/yarn_ranger_init.yml index 7c385ef5..be1b1378 100644 --- a/playbooks/yarn_ranger_init.yml +++ b/playbooks/yarn_ranger_init.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_ranger - name: Initialize YARN Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.ranger tasks_from: init - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_ranger_install.yml b/playbooks/yarn_ranger_install.yml index cabe8bb6..8040bc9d 100644 --- a/playbooks/yarn_ranger_install.yml +++ b/playbooks/yarn_ranger_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_ranger - name: Install YARN Ranger plugin - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.ranger tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_capacityscheduler.yml b/playbooks/yarn_resourcemanager_capacityscheduler.yml index c47abd21..133f6235 100644 --- a/playbooks/yarn_resourcemanager_capacityscheduler.yml +++ b/playbooks/yarn_resourcemanager_capacityscheduler.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Configure YARN RM capacity scheduler - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: capacity_scheduler - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_config.yml b/playbooks/yarn_resourcemanager_config.yml index 6f9e8c42..63f31ea5 100644 --- a/playbooks/yarn_resourcemanager_config.yml +++ b/playbooks/yarn_resourcemanager_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Configure YARN RM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_install.yml b/playbooks/yarn_resourcemanager_install.yml index fa1b8d27..52d60eb1 100644 --- a/playbooks/yarn_resourcemanager_install.yml +++ b/playbooks/yarn_resourcemanager_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Install YARN RM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_restart.yml b/playbooks/yarn_resourcemanager_restart.yml index 6aeaf15a..f6e84bac 100644 --- a/playbooks/yarn_resourcemanager_restart.yml +++ b/playbooks/yarn_resourcemanager_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Restart YARN RM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_start.yml b/playbooks/yarn_resourcemanager_start.yml index c194fa78..7ef91ae3 100644 --- a/playbooks/yarn_resourcemanager_start.yml +++ b/playbooks/yarn_resourcemanager_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Start YARN RM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_status.yml b/playbooks/yarn_resourcemanager_status.yml index 6976132d..57ea2bb6 100644 --- a/playbooks/yarn_resourcemanager_status.yml +++ b/playbooks/yarn_resourcemanager_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: YARN RM status - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_resourcemanager_stop.yml b/playbooks/yarn_resourcemanager_stop.yml index 79f4eccb..413afabc 100644 --- a/playbooks/yarn_resourcemanager_stop.yml +++ b/playbooks/yarn_resourcemanager_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Stop YARN RM - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/yarn_ssl-tls_install.yml b/playbooks/yarn_ssl-tls_install.yml index cd94bc79..16bec118 100644 --- a/playbooks/yarn_ssl-tls_install.yml +++ b/playbooks/yarn_ssl-tls_install.yml @@ -8,47 +8,47 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_resourcemanager - name: Install YARN Resource Manager SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.resourcemanager tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Nodemanager install hosts: yarn_nm tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_nodemanager - name: Install YARN Node Manager SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.nodemanager tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS AppTimelineServer install hosts: yarn_ats tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_apptimelineserver - name: Install YARN App Timeline Server SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.apptimelineserver tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Job History Server install hosts: mapred_jhs tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_mapred_jobhistoryserver - name: Install YARN Mapred Job History Server SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.jobhistoryserver tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: SSL-TLS Yarn Client install hosts: hadoop_client tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: yarn_client - name: Install YARN Client SSL-TLS - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.client tasks_from: ssl-tls - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_check.yml b/playbooks/zookeeper_check.yml index 42071ed3..7a660620 100644 --- a/playbooks/zookeeper_check.yml +++ b/playbooks/zookeeper_check.yml @@ -10,6 +10,6 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_check - name: Check zookeeper service - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_client_config.yml b/playbooks/zookeeper_client_config.yml index 94cabcab..53056af0 100644 --- a/playbooks/zookeeper_client_config.yml +++ b/playbooks/zookeeper_client_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_client - name: Configure zookeeper client - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.client tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_client_install.yml b/playbooks/zookeeper_client_install.yml index 02c88183..6db40c31 100644 --- a/playbooks/zookeeper_client_install.yml +++ b/playbooks/zookeeper_client_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_client - name: Install zookeeper client - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.client tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_jmx-exporter_config.yml b/playbooks/zookeeper_jmx-exporter_config.yml index 18388bb4..d426c152 100644 --- a/playbooks/zookeeper_jmx-exporter_config.yml +++ b/playbooks/zookeeper_jmx-exporter_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Configure zookeeper server jmx-exporter - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: jmx-exporter - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_kerberos_install.yml b/playbooks/zookeeper_kerberos_install.yml index a5de96c9..49531d4b 100644 --- a/playbooks/zookeeper_kerberos_install.yml +++ b/playbooks/zookeeper_kerberos_install.yml @@ -9,10 +9,10 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_kerberos - name: Install zookeeper server kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task - name: Kerberos Zookeeper Client Install hosts: edge @@ -21,7 +21,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_kerberos - name: Install zookeeper client kerberos - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.client tasks_from: kerberos - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_check.yml b/playbooks/zookeeper_server_check.yml index dce6f8c6..7049abb0 100644 --- a/playbooks/zookeeper_server_check.yml +++ b/playbooks/zookeeper_server_check.yml @@ -10,7 +10,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Check zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: check - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_config.yml b/playbooks/zookeeper_server_config.yml index 07375ad0..0d8ca720 100644 --- a/playbooks/zookeeper_server_config.yml +++ b/playbooks/zookeeper_server_config.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Configure zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: config - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_install.yml b/playbooks/zookeeper_server_install.yml index 18734984..7ea5042a 100644 --- a/playbooks/zookeeper_server_install.yml +++ b/playbooks/zookeeper_server_install.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Install zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: install - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_restart.yml b/playbooks/zookeeper_server_restart.yml index 7870c5a0..1427342c 100644 --- a/playbooks/zookeeper_server_restart.yml +++ b/playbooks/zookeeper_server_restart.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Restart zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: restart - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_start.yml b/playbooks/zookeeper_server_start.yml index 94b23108..4984c49e 100644 --- a/playbooks/zookeeper_server_start.yml +++ b/playbooks/zookeeper_server_start.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Start zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: start - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_status.yml b/playbooks/zookeeper_server_status.yml index 010680b0..2081c8e9 100644 --- a/playbooks/zookeeper_server_status.yml +++ b/playbooks/zookeeper_server_status.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: zookeeper server status - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: status - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/playbooks/zookeeper_server_stop.yml b/playbooks/zookeeper_server_stop.yml index 996ad42e..d774446c 100644 --- a/playbooks/zookeeper_server_stop.yml +++ b/playbooks/zookeeper_server_stop.yml @@ -8,7 +8,7 @@ - tosit.tdp.resolve: # noqa unnamed-task node_name: zookeeper_server - name: Stop zookeeper server - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.server tasks_from: stop - - meta: clear_facts # noqa unnamed-task + - ansible.builtin.meta: clear_facts # noqa unnamed-task diff --git a/plugins/filter/access_fqdn.py b/plugins/filter/access_fqdn.py index bf652f95..13f33cc1 100644 --- a/plugins/filter/access_fqdn.py +++ b/plugins/filter/access_fqdn.py @@ -1,4 +1,3 @@ -#!/usr/bin/python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/module_utils/kerberos.py b/plugins/module_utils/kerberos.py index 92de1115..fcaa433c 100644 --- a/plugins/module_utils/kerberos.py +++ b/plugins/module_utils/kerberos.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/module_utils/kerberos_admin.py b/plugins/module_utils/kerberos_admin.py index 287a2407..0564b19b 100644 --- a/plugins/module_utils/kerberos_admin.py +++ b/plugins/module_utils/kerberos_admin.py @@ -1,4 +1,3 @@ -#! /usr/bin/env python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/modules/hdfs_file.py b/plugins/modules/hdfs_file.py index 8ae6ae77..f831f5f3 100644 --- a/plugins/modules/hdfs_file.py +++ b/plugins/modules/hdfs_file.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/modules/krb_keytab.py b/plugins/modules/krb_keytab.py index 95f2519e..6b5b9e19 100644 --- a/plugins/modules/krb_keytab.py +++ b/plugins/modules/krb_keytab.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/modules/krb_principal.py b/plugins/modules/krb_principal.py index 656f1127..3e249458 100644 --- a/plugins/modules/krb_principal.py +++ b/plugins/modules/krb_principal.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/plugins/modules/ranger_policy.py b/plugins/modules/ranger_policy.py index af51e03b..4efcc243 100644 --- a/plugins/modules/ranger_policy.py +++ b/plugins/modules/ranger_policy.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#!/usr/bin/python # Copyright 2022 TOSIT.IO # SPDX-License-Identifier: Apache-2.0 diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index 162ae0a5..fc409e81 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -3,5 +3,5 @@ --- - name: systemctl daemon-reload - systemd: + ansible.builtin.systemd: daemon_reload: yes diff --git a/roles/exporter/jmx/tasks/install.yml b/roles/exporter/jmx/tasks/install.yml index 6a532c90..ccb08584 100644 --- a/roles/exporter/jmx/tasks/install.yml +++ b/roles/exporter/jmx/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Ensure "{{ jmx_exporter_root_dir }}" exists - file: + ansible.builtin.file: path: "{{ jmx_exporter_root_dir }}" state: directory group: root @@ -11,7 +11,7 @@ mode: "755" - name: Upload jmx-exporter jar - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ jmx_exporter_dist_file }}" dest: "{{ jmx_exporter_root_dir }}" group: root @@ -20,7 +20,7 @@ diff: false - name: Create symbolic link to jmx exporter jar - file: + ansible.builtin.file: src: "{{ jmx_exporter_root_dir }}/{{ jmx_exporter_dist_file }}" dest: "{{ jmx_exporter_install_file }}" state: link diff --git a/roles/hadoop/client/tasks/config.yml b/roles/hadoop/client/tasks/config.yml index 0fb06025..baed6700 100644 --- a/roles/hadoop/client/tasks/config.yml +++ b/roles/hadoop/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/" dest: "{{ hadoop_client_conf_dir }}.{{ ansible_date_time.epoch }}" group: root @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_client_conf_dir }}/hadoop-env.sh" group: root @@ -26,7 +26,7 @@ hadoop_conf_dir: "{{ hadoop_client_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_client_conf_dir }}/log4j.properties" group: root @@ -36,7 +36,7 @@ hadoop_log_dir: "{{ hadoop_log4j_client_log_dir }}" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_client_conf_dir }}/core-site.xml" group: root @@ -44,7 +44,7 @@ mode: "644" - name: Render mapred-site.xml - template: + ansible.builtin.template: src: mapred-site.xml.j2 dest: "{{ hadoop_client_conf_dir }}/mapred-site.xml" group: root @@ -52,7 +52,7 @@ mode: "644" - name: Render rack-topology.sh - template: + ansible.builtin.template: src: rack-topology.sh.j2 dest: "{{ hadoop_client_conf_dir }}/rack-topology.sh" group: root @@ -60,7 +60,7 @@ mode: "755" - name: Render rack_topology.data - template: + ansible.builtin.template: src: rack_topology.data.j2 dest: "{{ hadoop_client_conf_dir }}/rack_topology.data" group: root diff --git a/roles/hadoop/client/tasks/install.yml b/roles/hadoop/client/tasks/install.yml index 9eec3e37..4a6f9f34 100644 --- a/roles/hadoop/client/tasks/install.yml +++ b/roles/hadoop/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hadoop installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_client_conf_dir }}" state: directory group: root @@ -16,18 +16,18 @@ mode: "755" - name: Backup {{ hadoop_install_dir }}/etc/hadoop - command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk + ansible.builtin.command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk args: creates: "{{ hadoop_install_dir }}/etc/hadoop.bk" - name: Create symbolic link from etc/hadoop in {{ hadoop_install_dir }} to actual Hadoop client config dir - file: + ansible.builtin.file: src: "{{ hadoop_client_conf_dir }}" dest: "{{ hadoop_install_dir }}/etc/hadoop" state: link - name: Render /usr/bin/hadoop command - template: + ansible.builtin.template: src: hadoop-command.j2 dest: /usr/bin/hadoop mode: "755" diff --git a/roles/hadoop/client/tasks/kerberos.yml b/roles/hadoop/client/tasks/kerberos.yml index cae45d90..036f99fe 100644 --- a/roles/hadoop/client/tasks/kerberos.yml +++ b/roles/hadoop/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure mapred user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Check mapred user's keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hadoop/client/tasks/ssl-tls.yml b/roles/hadoop/client/tasks/ssl-tls.yml index 63f0ee13..96914027 100644 --- a/roles/hadoop/client/tasks/ssl-tls.yml +++ b/roles/hadoop/client/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-client.xml - template: + ansible.builtin.template: src: ssl-client.xml.j2 dest: "{{ hadoop_client_conf_dir }}/ssl-client.xml" group: root @@ -11,7 +11,7 @@ mode: "644" - name: Ensure hadoop truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hadoop/common/tasks/install.yml b/roles/hadoop/common/tasks/install.yml index c663e472..b0a34782 100644 --- a/roles/hadoop/common/tasks/install.yml +++ b/roles/hadoop/common/tasks/install.yml @@ -3,20 +3,20 @@ --- - name: Ensure hadoop group exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.group vars: group: "{{ hadoop_group }}" - name: Ensure mapred user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ mapred_user }}" group: "{{ hadoop_group }}" - name: Upload {{ hadoop_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ hadoop_dist_file }}" dest: "{{ binaries_upload_dir }}" group: root @@ -25,7 +25,7 @@ diff: false - name: Ensure {{ hadoop_root_dir }} exists - file: + ansible.builtin.file: path: "{{ hadoop_root_dir }}" state: directory group: root @@ -33,7 +33,7 @@ mode: "755" - name: Extract {{ hadoop_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ hadoop_dist_file }}" dest: "{{ hadoop_root_dir }}" group: root @@ -43,13 +43,13 @@ creates: "{{ hadoop_root_dir }}/{{ hadoop_release }}" - name: Create symbolic link to Hadoop installation - file: + ansible.builtin.file: src: "{{ hadoop_root_dir }}/{{ hadoop_release }}" dest: "{{ hadoop_install_dir }}" state: link - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hadoop_pid_dir }}" state: directory group: root @@ -57,7 +57,7 @@ mode: "755" - name: Template hadoop tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hadoop.conf.j2 dest: /etc/tmpfiles.d/hadoop.conf group: root @@ -65,7 +65,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hadoop_log_dir }}" state: directory group: "{{ hadoop_group }}" diff --git a/roles/hadoop/common/tasks/kerberos.yml b/roles/hadoop/common/tasks/kerberos.yml index 48faf346..730eca56 100644 --- a/roles/hadoop/common/tasks/kerberos.yml +++ b/roles/hadoop/common/tasks/kerberos.yml @@ -5,22 +5,22 @@ # First Step : Try to fetch all http_secrets from hosts - name: Init http_secret fact # In the documentation of meta clear_facts: facts setted by set_fact are not cleared, so we must set it to empty string. - set_fact: + ansible.builtin.set_fact: http_secret: "" - name: Check if http_secret file exists - stat: + ansible.builtin.stat: path: "{{ http_secret_location }}" register: http_secret_stat - name: Fetch content of http_secret if exists - slurp: + ansible.builtin.slurp: src: "{{ http_secret_location }}" register: http_secret_encoded when: http_secret_stat.stat.exists - name: Set local facts where http_secret exists - set_fact: + ansible.builtin.set_fact: http_secret: "{{ http_secret_encoded.content }}" when: http_secret_stat.stat.exists @@ -28,35 +28,35 @@ vars: # Get all local "http_secret" and remove undefined http_secret_list: "{{ ansible_play_hosts | map('extract', hostvars, 'http_secret') | select | list }}" - set_fact: + ansible.builtin.set_fact: http_secret: "{{ http_secret_list | first }}" when: http_secret_list | length > 0 run_once: true # Second Step : Create a new http_secret if not exists - name: Create a new http_secret when not exists - command: dd if=/dev/urandom of={{ http_secret_location }} bs=1024 count=1 + ansible.builtin.command: dd if=/dev/urandom of={{ http_secret_location }} bs=1024 count=1 run_once: true args: creates: "{{ http_secret_location }}" when: http_secret | length == 0 - name: Load the new http_secret when not exists - slurp: + ansible.builtin.slurp: src: "{{ http_secret_location }}" register: http_secret_encoded run_once: true when: http_secret | length == 0 - name: Set fact the new http_secret when not exists - set_fact: + ansible.builtin.set_fact: http_secret: "{{ http_secret_encoded.content }}" run_once: true when: http_secret | length == 0 # Final Step : Copy the http_secret to all hosts with an idempotent behavior - name: Copy http_secret to all hosts - copy: + ansible.builtin.copy: content: "{{ http_secret | b64decode }}" dest: "{{ http_secret_location }}" owner: root @@ -66,5 +66,5 @@ - name: Reset http_secret fact for next usage # In the documentation of meta clear_facts: facts setted by set_fact are not cleared, so we must set it to empty string. - set_fact: + ansible.builtin.set_fact: http_secret: "" diff --git a/roles/hbase/client/tasks/config.yml b/roles/hbase/client/tasks/config.yml index 71c6ddf3..772f7e8b 100644 --- a/roles/hbase/client/tasks/config.yml +++ b/roles/hbase/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_client_conf_dir }}/" dest: "{{ hbase_client_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: hbase/hbase-client-env.sh.j2 dest: "{{ hbase_client_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: hbase/log4j.properties.j2 dest: "{{ hbase_client_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: hbase/hbase-site.xml.j2 dest: "{{ hbase_client_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/core-site.xml dest: "{{ hbase_client_conf_dir }}/core-site.xml" owner: root diff --git a/roles/hbase/client/tasks/install.yml b/roles/hbase/client/tasks/install.yml index faccc32a..4d83e5d5 100644 --- a/roles/hbase/client/tasks/install.yml +++ b/roles/hbase/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Perform hbase common installation steps - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_hbase - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_client_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Render /usr/bin/hbase command - template: + ansible.builtin.template: src: hbase/hbase-command.j2 dest: /usr/bin/hbase owner: root @@ -24,7 +24,7 @@ mode: "755" - name: Upload {{ hbase_hbck2_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ hbase_hbck2_file }}" dest: "{{ hbase_root_dir }}/{{ hbase_release }}/lib/{{ hbase_hbck2_file }}" owner: root diff --git a/roles/hbase/client/tasks/kerberos.yml b/roles/hbase/client/tasks/kerberos.yml index 3d3a90d8..a5a63436 100644 --- a/roles/hbase/client/tasks/kerberos.yml +++ b/roles/hbase/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Perform kerberos common installation steps - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Template krb5 JAAS - template: + ansible.builtin.template: src: hbase/krb5JAASClient.conf.j2 dest: "{{ hbase_client_conf_dir }}/krb5JAASClient.conf" owner: root @@ -16,7 +16,7 @@ mode: "644" - name: Ensure hbase principal and keytab exists - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -28,7 +28,7 @@ when: krb_create_principals_keytabs - name: Ensure hbase keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hbase/common/tasks/install_hbase.yml b/roles/hbase/common/tasks/install_hbase.yml index 19039738..f54292d5 100644 --- a/roles/hbase/common/tasks/install_hbase.yml +++ b/roles/hbase/common/tasks/install_hbase.yml @@ -3,14 +3,14 @@ --- - name: Ensure hbase user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ hbase_user }}" group: "{{ hadoop_group }}" - name: Upload {{ hbase_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ hbase_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -19,7 +19,7 @@ diff: false - name: Ensure {{ hbase_root_dir }} exists - file: + ansible.builtin.file: path: "{{ hbase_root_dir }}" state: directory owner: root @@ -27,7 +27,7 @@ mode: "755" - name: Extract {{ hbase_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ hbase_dist_file }}" dest: "{{ hbase_root_dir }}" owner: root @@ -37,7 +37,7 @@ creates: "{{ hbase_root_dir }}/{{ hbase_release }}" - name: Ensure hbase permissions - file: + ansible.builtin.file: path: "{{ hbase_root_dir }}/{{ hbase_release }}" owner: root group: root @@ -46,13 +46,13 @@ recurse: true - name: Create symbolic link to HBase installation - file: + ansible.builtin.file: src: "{{ hbase_root_dir }}/{{ hbase_release }}" dest: "{{ hbase_install_dir }}" state: link - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hbase_pid_dir }}" state: directory owner: "{{ hbase_user }}" @@ -60,7 +60,7 @@ mode: "750" - name: Template hbase tmpfiles.d - template: + ansible.builtin.template: src: hbase/tmpfiles-hbase.conf.j2 dest: /etc/tmpfiles.d/hbase.conf owner: root @@ -68,7 +68,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hbase_log_dir }}" state: directory owner: "{{ hbase_user }}" diff --git a/roles/hbase/common/tasks/install_phoenix.yml b/roles/hbase/common/tasks/install_phoenix.yml index 16ae44e5..4a0a92f6 100644 --- a/roles/hbase/common/tasks/install_phoenix.yml +++ b/roles/hbase/common/tasks/install_phoenix.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ phoenix_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ phoenix_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ phoenix_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ phoenix_dist_file }}" dest: "{{ phoenix_root_dir }}" owner: root @@ -22,7 +22,7 @@ creates: "{{ phoenix_root_dir }}/{{ phoenix_release }}" - name: Ensure phoenix permissions - file: + ansible.builtin.file: path: "{{ phoenix_root_dir }}/{{ phoenix_release }}" owner: root group: root @@ -31,7 +31,7 @@ recurse: true - name: Create symbolic link to Phoenix installation - file: + ansible.builtin.file: src: "{{ phoenix_root_dir }}/{{ phoenix_release }}" dest: "{{ phoenix_install_dir }}" state: link diff --git a/roles/hbase/master/tasks/config.yml b/roles/hbase/master/tasks/config.yml index 09625c63..3a71e1ac 100644 --- a/roles/hbase/master/tasks/config.yml +++ b/roles/hbase/master/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_master_conf_dir }}/" dest: "{{ hbase_master_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: hbase/hbase-env.sh.j2 dest: "{{ hbase_master_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: hbase/log4j.properties.j2 dest: "{{ hbase_master_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: hbase/hbase-site.xml.j2 dest: "{{ hbase_master_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/core-site.xml" dest: "{{ hbase_master_conf_dir }}/core-site.xml" owner: root @@ -47,7 +47,7 @@ remote_src: true - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/hdfs-site.xml" dest: "{{ hbase_master_conf_dir }}/hdfs-site.xml" owner: root @@ -56,7 +56,7 @@ remote_src: true - name: Render jmxremote.password - template: + ansible.builtin.template: src: hbase/jmxremote.password.j2 dest: "{{ hbase_master_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hbase/master/tasks/install.yml b/roles/hbase/master/tasks/install.yml index d64f842a..4a9cebe0 100644 --- a/roles/hbase/master/tasks/install.yml +++ b/roles/hbase/master/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure hbase common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_hbase - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_master_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template HBase Master service file - template: + ansible.builtin.template: src: hbase/hbase-master.service.j2 dest: /usr/lib/systemd/system/hbase-master.service owner: root diff --git a/roles/hbase/master/tasks/jmx-exporter.yml b/roles/hbase/master/tasks/jmx-exporter.yml index d4d86563..e4dec496 100644 --- a/roles/hbase/master/tasks/jmx-exporter.yml +++ b/roles/hbase/master/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/hm.yml" owner: root diff --git a/roles/hbase/master/tasks/kerberos.yml b/roles/hbase/master/tasks/kerberos.yml index 0b3ef91c..d1fcfd3b 100644 --- a/roles/hbase/master/tasks/kerberos.yml +++ b/roles/hbase/master/tasks/kerberos.yml @@ -3,17 +3,17 @@ --- - name: Ensure kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hadoop kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Template krb5 JAAS - template: + ansible.builtin.template: src: hbase/krb5JAASServer.conf.j2 dest: "{{ hbase_master_conf_dir }}/krb5JAASServer.conf" owner: root @@ -24,7 +24,7 @@ hbase_principal: "{{ hbase_master_kerberos_principal }}" - name: Ensure hbase principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -36,7 +36,7 @@ when: krb_create_principals_keytabs - name: Ensure hbase keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hbase/master/tasks/restart.yml b/roles/hbase/master/tasks/restart.yml index f9f5b577..ff85d361 100644 --- a/roles/hbase/master/tasks/restart.yml +++ b/roles/hbase/master/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HBase Master - service: + ansible.builtin.service: name: hbase-master state: restarted enabled: "{{ hbase_master_start_on_boot }}" diff --git a/roles/hbase/master/tasks/ssl-tls.yml b/roles/hbase/master/tasks/ssl-tls.yml index aea11d18..9ebdb5db 100644 --- a/roles/hbase/master/tasks/ssl-tls.yml +++ b/roles/hbase/master/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: hbase/ssl-server.xml.j2 dest: "{{ hbase_master_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hbase keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hbase_keystore_password }}" - name: Ensure hbase truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hbase/master/tasks/start.yml b/roles/hbase/master/tasks/start.yml index 501fab07..b02e2642 100644 --- a/roles/hbase/master/tasks/start.yml +++ b/roles/hbase/master/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start HBase Master - service: + ansible.builtin.service: name: hbase-master state: started enabled: "{{ hbase_master_start_on_boot }}" diff --git a/roles/hbase/master/tasks/status.yml b/roles/hbase/master/tasks/status.yml index 79b0def2..cb2c5a7a 100644 --- a/roles/hbase/master/tasks/status.yml +++ b/roles/hbase/master/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hbase-master is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hbase-master.service'].state == "running" quiet: true diff --git a/roles/hbase/master/tasks/stop.yml b/roles/hbase/master/tasks/stop.yml index 23dcdab4..a51dfcf4 100644 --- a/roles/hbase/master/tasks/stop.yml +++ b/roles/hbase/master/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop HBase Master - service: + ansible.builtin.service: name: hbase-master state: stopped enabled: "{{ hbase_master_start_on_boot }}" diff --git a/roles/hbase/phoenix/client/tasks/install.yml b/roles/hbase/phoenix/client/tasks/install.yml index cdbd1d86..cccdbf40 100644 --- a/roles/hbase/phoenix/client/tasks/install.yml +++ b/roles/hbase/phoenix/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure phoenix common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_phoenix - name: Render /usr/bin/sqlline.py command - template: + ansible.builtin.template: src: phoenix/sqlline-command.py.j2 dest: /usr/bin/sqlline.py owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Render /usr/bin/psql.py command - template: + ansible.builtin.template: src: phoenix/psql-command.py.j2 dest: /usr/bin/psql.py owner: root diff --git a/roles/hbase/phoenix/coprocessor/tasks/install.yml b/roles/hbase/phoenix/coprocessor/tasks/install.yml index b2a709f5..a2859544 100644 --- a/roles/hbase/phoenix/coprocessor/tasks/install.yml +++ b/roles/hbase/phoenix/coprocessor/tasks/install.yml @@ -3,27 +3,27 @@ --- - name: Ensure phoenix common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_phoenix - name: Create symbolic link to phoenix hbase server jar - file: + ansible.builtin.file: src: "{{ phoenix_root_dir }}/{{ phoenix_release }}/{{ phoenix_server_release }}.jar" dest: "{{ hbase_root_dir }}/{{ hbase_release }}/lib/phoenix-server-hbase-2.1.jar" state: link - name: Populate service facts - service_facts: {} + ansible.builtin.service_facts: {} - name: Restart HBase master if it was started - service: + ansible.builtin.service: name: hbase-master state: restarted when: "'hbase-master.service' in services and services['hbase-master.service'].state == 'running'" - name: Restart HBase region server if it was started - service: + ansible.builtin.service: name: hbase-regionserver state: restarted when: "'hbase-regionserver.service' in services and services['hbase-regionserver.service'].state == 'running'" diff --git a/roles/hbase/phoenix/coprocessor/tasks/ranger_phoenix_policy.yml b/roles/hbase/phoenix/coprocessor/tasks/ranger_phoenix_policy.yml index bafea9bd..b1c6de56 100644 --- a/roles/hbase/phoenix/coprocessor/tasks/ranger_phoenix_policy.yml +++ b/roles/hbase/phoenix/coprocessor/tasks/ranger_phoenix_policy.yml @@ -4,7 +4,7 @@ --- - name: Create Phoenix policy run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_hbase_install_properties.POLICY_MGR_URL }}/service/public/v2/api/policy" headers: Accept: application/json diff --git a/roles/hbase/phoenix/queryserver/client/tasks/config.yml b/roles/hbase/phoenix/queryserver/client/tasks/config.yml index c8461a36..3c25fdcb 100644 --- a/roles/hbase/phoenix/queryserver/client/tasks/config.yml +++ b/roles/hbase/phoenix/queryserver/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_phoenix_queryserver_client_conf_dir }}/" dest: "{{ hbase_phoenix_queryserver_client_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: phoenix_queryserver/hbase-env.sh.j2 dest: "{{ hbase_phoenix_queryserver_client_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: phoenix_queryserver/log4j.properties.j2 dest: "{{ hbase_phoenix_queryserver_client_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: phoenix_queryserver/hbase-site.xml.j2 dest: "{{ hbase_phoenix_queryserver_client_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/core-site.xml dest: "{{ hbase_phoenix_queryserver_client_conf_dir }}/core-site.xml" owner: root diff --git a/roles/hbase/phoenix/queryserver/client/tasks/install.yml b/roles/hbase/phoenix/queryserver/client/tasks/install.yml index b675b2c0..2ea1cbd7 100644 --- a/roles/hbase/phoenix/queryserver/client/tasks/install.yml +++ b/roles/hbase/phoenix/queryserver/client/tasks/install.yml @@ -3,17 +3,17 @@ --- - name: Ensure phoenix common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_phoenix - name: Ensure common phoenix queryserver installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_phoenix_queryserver_client_conf_dir }}" state: directory owner: root @@ -21,7 +21,7 @@ mode: "755" - name: Render /usr/bin/sqlline-thin.py command - template: + ansible.builtin.template: src: phoenix_queryserver/sqlline-thin-command.py.j2 dest: /usr/bin/sqlline-thin.py owner: root diff --git a/roles/hbase/phoenix/queryserver/common/tasks/install.yml b/roles/hbase/phoenix/queryserver/common/tasks/install.yml index e39d2baf..7cda40e2 100644 --- a/roles/hbase/phoenix/queryserver/common/tasks/install.yml +++ b/roles/hbase/phoenix/queryserver/common/tasks/install.yml @@ -3,14 +3,14 @@ --- - name: Ensure phoenix queryserver user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ phoenix_queryserver_user }}" group: "{{ hadoop_group }}" - name: Upload {{ phoenix_queryserver_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ phoenix_queryserver_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -19,7 +19,7 @@ diff: false - name: Extract {{ phoenix_queryserver_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ phoenix_queryserver_dist_file }}" dest: "{{ phoenix_queryserver_root_dir }}" owner: root @@ -29,7 +29,7 @@ creates: "{{ phoenix_queryserver_root_dir }}/{{ phoenix_queryserver_release }}" - name: Ensure Phoenix permissions - file: + ansible.builtin.file: path: "{{ phoenix_queryserver_root_dir }}/{{ phoenix_queryserver_release }}" owner: root group: root @@ -38,7 +38,7 @@ recurse: true - name: Create symbolic link to Phoenix QueryServer installation - file: + ansible.builtin.file: src: "{{ phoenix_queryserver_root_dir }}/{{ phoenix_queryserver_release }}" dest: "{{ phoenix_queryserver_install_dir }}" state: link diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/config.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/config.yml index da67e972..4c12bc43 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/config.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/" dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: phoenix_queryserver/hbase-env.sh.j2 dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: phoenix_queryserver/log4j.properties.j2 dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: phoenix_queryserver/hbase-site.xml.j2 dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/core-site.xml dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/core-site.xml" owner: root @@ -47,7 +47,7 @@ remote_src: true - name: Render jmxremote.password - template: + ansible.builtin.template: src: hbase/jmxremote.password.j2 dest: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml index 1fbab44b..f56a2af3 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure phoenix queryserver common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.phoenix.queryserver.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_phoenix_queryserver_daemon_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ phoenix_queryserver_pid_dir }}" state: directory group: "{{ hadoop_group }}" @@ -24,7 +24,7 @@ mode: "750" - name: Create log directory - file: + ansible.builtin.file: path: "{{ phoenix_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -32,7 +32,7 @@ mode: "750" - name: Template Phoenix QueryServer service file - template: + ansible.builtin.template: src: phoenix_queryserver/phoenix-queryserver.service.j2 dest: /usr/lib/systemd/system/phoenix-queryserver.service owner: root diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/jmx-exporter.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/jmx-exporter.yml index 8cb21ce7..b464dafa 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/jmx-exporter.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/pqs.yml" owner: root diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml index f2dd7552..4e693629 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml @@ -3,13 +3,13 @@ --- - name: Ensure kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - block: - name: Ensure phoenix queryserver principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ mode: "0600" - name: Ensure HTTP spnego principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -34,7 +34,7 @@ - name: Phoenix QueryServer keytabs check block: - name: Ensure phoenix queryserver keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -45,7 +45,7 @@ mode: "0600" - name: Ensure HTTP spnego keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/restart.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/restart.yml index f22c3911..de68f58d 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/restart.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Phoenix QueryServer - service: + ansible.builtin.service: name: phoenix-queryserver state: restarted enabled: "{{ phoenix_queryserver_start_on_boot }}" diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/ssl-tls.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/ssl-tls.yml index a3e8ca9c..bce01373 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/ssl-tls.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -13,7 +13,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure phoenix queryserver keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -21,7 +21,7 @@ keystore_password: "{{ hbase_keystore_password }}" - name: Ensure phoenix queryserver truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/start.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/start.yml index 5c570857..a1d40690 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/start.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Phoenix QueryServer - service: + ansible.builtin.service: name: phoenix-queryserver state: started enabled: "{{ phoenix_queryserver_start_on_boot }}" diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml index 9bda3e1a..0217bee8 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert phoenix-queryserver is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['phoenix-queryserver.service'].state == "running" quiet: true diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/stop.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/stop.yml index bfc57993..59aa1b1f 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/stop.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Phoenix QueryServer - service: + ansible.builtin.service: name: phoenix-queryserver state: stopped enabled: "{{ phoenix_queryserver_start_on_boot }}" diff --git a/roles/hbase/ranger/tasks/config.yml b/roles/hbase/ranger/tasks/config.yml index 223942d3..400d4d3b 100644 --- a/roles/hbase/ranger/tasks/config.yml +++ b/roles/hbase/ranger/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: hbase/install_hbase.properties.j2 dest: "{{ ranger_hbase_install_dir }}/install.properties" owner: root @@ -14,18 +14,18 @@ # There is no way to tell the script to use /etc/hbase/conf.master or /etc/hbase/conf.rs # So we create a symbolic link in installation /opt/hbase/ that points to actual conf - name: Backup {{ hbase_install_dir }}/conf - command: mv {{ hbase_install_dir }}/conf {{ hbase_install_dir }}/conf.bk + ansible.builtin.command: mv {{ hbase_install_dir }}/conf {{ hbase_install_dir }}/conf.bk args: creates: "{{ hbase_install_dir }}/conf.bk" - name: Create symbolic link from conf in {{ hbase_install_dir }} to actual HBase config dir - file: + ansible.builtin.file: src: "{{ hbase_master_conf_dir if 'hbase_master' in group_names else hbase_rs_conf_dir }}" dest: "{{ hbase_install_dir }}/conf" state: link - name: Run enable-hbase-plugin.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./enable-hbase-plugin.sh args: diff --git a/roles/hbase/ranger/tasks/init.yml b/roles/hbase/ranger/tasks/init.yml index 7a6889ac..67096ede 100644 --- a/roles/hbase/ranger/tasks/init.yml +++ b/roles/hbase/ranger/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create HBase service run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_hbase_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: diff --git a/roles/hbase/ranger/tasks/install.yml b/roles/hbase/ranger/tasks/install.yml index e7df7ba3..9340177a 100644 --- a/roles/hbase/ranger/tasks/install.yml +++ b/roles/hbase/ranger/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ ranger_hbase_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_hbase_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ ranger_hbase_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_hbase_dist_file }}" dest: "{{ hbase_root_dir }}" owner: root @@ -22,7 +22,7 @@ creates: "{{ hbase_root_dir }}/{{ ranger_hbase_release }}" - name: Ensure right permissions on ranger libs - file: + ansible.builtin.file: path: "{{ hbase_root_dir }}/{{ ranger_hbase_release }}" owner: root group: root @@ -31,7 +31,7 @@ state: directory - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ hbase_root_dir }}/{{ ranger_hbase_release }}" dest: "{{ ranger_hbase_install_dir }}" state: link diff --git a/roles/hbase/regionserver/tasks/config.yml b/roles/hbase/regionserver/tasks/config.yml index 07270357..5ce591f4 100644 --- a/roles/hbase/regionserver/tasks/config.yml +++ b/roles/hbase/regionserver/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_rs_conf_dir }}/" dest: "{{ hbase_rs_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: hbase/hbase-env.sh.j2 dest: "{{ hbase_rs_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: hbase/log4j.properties.j2 dest: "{{ hbase_rs_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: hbase/hbase-site.xml.j2 dest: "{{ hbase_rs_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/core-site.xml" dest: "{{ hbase_rs_conf_dir }}/core-site.xml" owner: root @@ -47,7 +47,7 @@ remote_src: true - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/hdfs-site.xml" dest: "{{ hbase_rs_conf_dir }}/hdfs-site.xml" owner: root @@ -56,7 +56,7 @@ remote_src: true - name: Render jmxremote.password - template: + ansible.builtin.template: src: hbase/jmxremote.password.j2 dest: "{{ hbase_rs_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hbase/regionserver/tasks/install.yml b/roles/hbase/regionserver/tasks/install.yml index 6a9fde66..51202438 100644 --- a/roles/hbase/regionserver/tasks/install.yml +++ b/roles/hbase/regionserver/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure hbase common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_hbase - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_rs_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template HBase RegionServer service file - template: + ansible.builtin.template: src: hbase/hbase-regionserver.service.j2 dest: /usr/lib/systemd/system/hbase-regionserver.service owner: root diff --git a/roles/hbase/regionserver/tasks/jmx-exporter.yml b/roles/hbase/regionserver/tasks/jmx-exporter.yml index ba33e886..9cdcc328 100644 --- a/roles/hbase/regionserver/tasks/jmx-exporter.yml +++ b/roles/hbase/regionserver/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/hrs.yml" owner: root diff --git a/roles/hbase/regionserver/tasks/kerberos.yml b/roles/hbase/regionserver/tasks/kerberos.yml index 8840e67e..df01eb03 100644 --- a/roles/hbase/regionserver/tasks/kerberos.yml +++ b/roles/hbase/regionserver/tasks/kerberos.yml @@ -3,17 +3,17 @@ --- - name: Ensure kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hadoop kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Template krb5 JAAS - template: + ansible.builtin.template: src: hbase/krb5JAASServer.conf.j2 dest: "{{ hbase_rs_conf_dir }}/krb5JAASServer.conf" owner: root @@ -24,7 +24,7 @@ hbase_principal: "{{ hbase_regionserver_kerberos_principal }}" - name: Ensure hbase principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -36,7 +36,7 @@ when: krb_create_principals_keytabs - name: Ensure hbase keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hbase/regionserver/tasks/restart.yml b/roles/hbase/regionserver/tasks/restart.yml index 94496bc6..2441da75 100644 --- a/roles/hbase/regionserver/tasks/restart.yml +++ b/roles/hbase/regionserver/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HBase RegionServer - service: + ansible.builtin.service: name: hbase-regionserver state: restarted enabled: "{{ hbase_rs_start_on_boot }}" diff --git a/roles/hbase/regionserver/tasks/ssl-tls.yml b/roles/hbase/regionserver/tasks/ssl-tls.yml index 592d9911..a092e22c 100644 --- a/roles/hbase/regionserver/tasks/ssl-tls.yml +++ b/roles/hbase/regionserver/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: hbase/ssl-server.xml.j2 dest: "{{ hbase_rs_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hbase keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hbase_keystore_password }}" - name: Ensure hbase truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hbase/regionserver/tasks/start.yml b/roles/hbase/regionserver/tasks/start.yml index 61593b4b..f2e2745c 100644 --- a/roles/hbase/regionserver/tasks/start.yml +++ b/roles/hbase/regionserver/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start HBase RegionServer - service: + ansible.builtin.service: name: hbase-regionserver state: started enabled: "{{ hbase_rs_start_on_boot }}" diff --git a/roles/hbase/regionserver/tasks/status.yml b/roles/hbase/regionserver/tasks/status.yml index becc6aa0..ad801797 100644 --- a/roles/hbase/regionserver/tasks/status.yml +++ b/roles/hbase/regionserver/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hbase-regionserver is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hbase-regionserver.service'].state == "running" quiet: true diff --git a/roles/hbase/regionserver/tasks/stop.yml b/roles/hbase/regionserver/tasks/stop.yml index 54546c2e..c7f423be 100644 --- a/roles/hbase/regionserver/tasks/stop.yml +++ b/roles/hbase/regionserver/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop HBase RegionServer - service: + ansible.builtin.service: name: hbase-regionserver state: stopped enabled: "{{ hbase_rs_start_on_boot }}" diff --git a/roles/hbase/rest/tasks/config.yml b/roles/hbase/rest/tasks/config.yml index bf20a79b..93545e3a 100644 --- a/roles/hbase/rest/tasks/config.yml +++ b/roles/hbase/rest/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hbase_rest_conf_dir }}/" dest: "{{ hbase_rest_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hbase-env.sh - template: + ansible.builtin.template: src: hbase/hbase-env.sh.j2 dest: "{{ hbase_rest_conf_dir }}/hbase-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: hbase/log4j.properties.j2 dest: "{{ hbase_rest_conf_dir }}/log4j.properties" owner: root @@ -30,7 +30,7 @@ mode: "644" - name: Render hbase-site.xml - template: + ansible.builtin.template: src: hbase/hbase-site.xml.j2 dest: "{{ hbase_rest_conf_dir }}/hbase-site.xml" owner: root @@ -38,7 +38,7 @@ mode: "644" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/core-site.xml dest: "{{ hbase_rest_conf_dir }}/core-site.xml" owner: root @@ -47,7 +47,7 @@ remote_src: true - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ hbase_rest_conf_dir }}/hdfs-site.xml" owner: root @@ -56,7 +56,7 @@ remote_src: true - name: Render jmxremote.password - template: + ansible.builtin.template: src: hbase/jmxremote.password.j2 dest: "{{ hbase_rest_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hbase/rest/tasks/install.yml b/roles/hbase/rest/tasks/install.yml index 6775fcaf..3cc62293 100644 --- a/roles/hbase/rest/tasks/install.yml +++ b/roles/hbase/rest/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure hbase common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hbase.common tasks_from: install_hbase - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hbase_rest_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template HBase REST service file - template: + ansible.builtin.template: src: hbase/hbase-rest.service.j2 dest: /usr/lib/systemd/system/hbase-rest.service owner: root diff --git a/roles/hbase/rest/tasks/jmx-exporter.yml b/roles/hbase/rest/tasks/jmx-exporter.yml index 2232aa0f..2750c28d 100644 --- a/roles/hbase/rest/tasks/jmx-exporter.yml +++ b/roles/hbase/rest/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/hr.yml" owner: root diff --git a/roles/hbase/rest/tasks/kerberos.yml b/roles/hbase/rest/tasks/kerberos.yml index 81bd3e67..bb3fb517 100644 --- a/roles/hbase/rest/tasks/kerberos.yml +++ b/roles/hbase/rest/tasks/kerberos.yml @@ -3,17 +3,17 @@ --- - name: Ensure kerberos common installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hadoop kerberos common installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Template krb5 JAAS - template: + ansible.builtin.template: src: hbase/krb5JAASServer.conf.j2 dest: "{{ hbase_rest_conf_dir }}/krb5JAASServer.conf" owner: root @@ -26,7 +26,7 @@ - name: HBase Rest keytabs creation block: - name: Ensure hbase principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -37,7 +37,7 @@ mode: "0600" - name: Ensure HTTP spnego principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -51,7 +51,7 @@ - name: HBase Rest keytabs check block: - name: Ensure hbase keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -62,7 +62,7 @@ mode: "0600" - name: Ensure HTTP spnego keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hbase/rest/tasks/restart.yml b/roles/hbase/rest/tasks/restart.yml index bbe1bdcb..44fe9212 100644 --- a/roles/hbase/rest/tasks/restart.yml +++ b/roles/hbase/rest/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HBase REST - service: + ansible.builtin.service: name: hbase-rest state: restarted enabled: "{{ hbase_rest_start_on_boot }}" diff --git a/roles/hbase/rest/tasks/ssl-tls.yml b/roles/hbase/rest/tasks/ssl-tls.yml index 5632f86c..8ee75c30 100644 --- a/roles/hbase/rest/tasks/ssl-tls.yml +++ b/roles/hbase/rest/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -13,7 +13,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hbase keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -21,7 +21,7 @@ keystore_password: "{{ hbase_keystore_password }}" - name: Ensure hbase truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hbase/rest/tasks/start.yml b/roles/hbase/rest/tasks/start.yml index 9dc19505..762771c2 100644 --- a/roles/hbase/rest/tasks/start.yml +++ b/roles/hbase/rest/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start HBase REST - service: + ansible.builtin.service: name: hbase-rest state: started enabled: "{{ hbase_rest_start_on_boot }}" diff --git a/roles/hbase/rest/tasks/status.yml b/roles/hbase/rest/tasks/status.yml index 19547512..29490363 100644 --- a/roles/hbase/rest/tasks/status.yml +++ b/roles/hbase/rest/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hbase-rest is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hbase-rest.service'].state == "running" quiet: true diff --git a/roles/hbase/rest/tasks/stop.yml b/roles/hbase/rest/tasks/stop.yml index 3fc5e718..5d145fe2 100644 --- a/roles/hbase/rest/tasks/stop.yml +++ b/roles/hbase/rest/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop HBase REST - service: + ansible.builtin.service: name: hbase-rest state: stopped enabled: "{{ hbase_rest_start_on_boot }}" diff --git a/roles/hdfs/check/tasks/main.yml b/roles/hdfs/check/tasks/main.yml index aee09c55..7d68c5af 100644 --- a/roles/hdfs/check/tasks/main.yml +++ b/roles/hdfs/check/tasks/main.yml @@ -5,7 +5,7 @@ - name: HDFS service check - "kinit" run_once: true become_user: "{{ hdfs_user }}" - shell: /bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab "{{ hdfs_headless_principal }}@{{ realm }}" + ansible.builtin.shell: /bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab "{{ hdfs_headless_principal }}@{{ realm }}" changed_when: false - name: HDFS service check - RPC check file with put/cat/get/delete & fsck @@ -13,17 +13,17 @@ become_user: "{{ hdfs_user }}" block: - name: HDFS service check - RPC check put file - shell: echo "HDFS Service Check" | hdfs dfs -put - {{ hdfs_check_path_file }} + ansible.builtin.shell: echo "HDFS Service Check" | hdfs dfs -put - {{ hdfs_check_path_file }} register: hdfs_put_file changed_when: false failed_when: 'hdfs_put_file.rc != 0' - name: HDFS service check - RPC check cat file - shell: hdfs dfs -cat {{ hdfs_check_path_file }} + ansible.builtin.shell: hdfs dfs -cat {{ hdfs_check_path_file }} register: hdfs_cat_file changed_when: false failed_when: 'hdfs_cat_file.rc != 0 or "HDFS Service Check" not in hdfs_cat_file.stdout' - name: HDFS service check - RPC check get file - shell: | + ansible.builtin.shell: | hdfs dfs -get {{ hdfs_check_path_file }} {{ hdfs_check_path_file }} && cat {{ hdfs_check_path_file }} && rm {{ hdfs_check_path_file }} @@ -31,18 +31,18 @@ changed_when: false failed_when: 'hdfs_get_file.rc != 0 or "HDFS Service Check" not in hdfs_get_file.stdout' - name: HDFS service check - RPC check delete file - shell: hdfs dfs -rm "{{ hdfs_check_path_file }}" + ansible.builtin.shell: hdfs dfs -rm "{{ hdfs_check_path_file }}" register: hdfs_delete_file changed_when: false failed_when: 'hdfs_delete_file.rc != 0' - name: HDFS service check - RPC check fsck - shell: hdfs fsck /tmp + ansible.builtin.shell: hdfs fsck /tmp register: hdfs_fsck changed_when: false failed_when: 'hdfs_fsck.rc != 0 or "Status: HEALTHY" not in hdfs_fsck.stdout' rescue: - name: HDFS service check - "kdestroy" - shell: /bin/kdestroy + ansible.builtin.shell: /bin/kdestroy changed_when: false failed_when: true @@ -51,39 +51,33 @@ become_user: "{{ hdfs_user }}" block: - name: HDFS service check - Get active namenode host - shell: hdfs haadmin -getAllServiceState | grep 'active' | cut -d':' -f 1 + ansible.builtin.shell: hdfs haadmin -getAllServiceState | grep 'active' | cut -d':' -f 1 register: webhdfs_nn_host changed_when: false failed_when: 'webhdfs_nn_host.rc != 0 or webhdfs_nn_host.stdout == ""' - name: HDFS service check - WebHDFS check create file - shell: curl -i -k -L --negotiate -u ":" -X PUT --data-binary "HDFS Service Check" "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=CREATE" - args: - warn: false + ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X PUT --data-binary "HDFS Service Check" "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=CREATE" register: webhdfs_create_file changed_when: false failed_when: 'webhdfs_create_file.rc != 0 or "HTTP/1.1 201 Created" not in webhdfs_create_file.stdout' - name: HDFS service check - WebHDFS check read file - shell: curl -i -k -L --negotiate -u ":" -X GET "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=OPEN" - args: - warn: false + ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X GET "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=OPEN" register: webhdfs_read_file changed_when: false failed_when: 'webhdfs_read_file.rc != 0 or ("HTTP/1.1 200 OK" not in webhdfs_read_file.stdout and "HDFS Service Check" not in webhdfs_read_file.stdout)' - name: HDFS service check - WebHDFS check delete file - shell: curl -i -k -L --negotiate -u ":" -X DELETE "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=DELETE" - args: - warn: false + ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X DELETE "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=DELETE" register: webhdfs_delete_file changed_when: false failed_when: webhdfs_delete_file.rc != 0 or ("HTTP/1.1 200 OK" not in webhdfs_delete_file.stdout and "\{\"boolean\":true\}" not in webhdfs_delete_file.stdout) rescue: - name: HDFS service check - "kdestroy" - shell: /bin/kdestroy + ansible.builtin.shell: /bin/kdestroy changed_when: false failed_when: true - name: HDFS service check - "kdestroy" run_once: true become_user: "{{ hdfs_user }}" - shell: /bin/kdestroy + ansible.builtin.shell: /bin/kdestroy changed_when: false diff --git a/roles/hdfs/client/tasks/config.yml b/roles/hdfs/client/tasks/config.yml index 8ccd5d53..c725b9ca 100644 --- a/roles/hdfs/client/tasks/config.yml +++ b/roles/hdfs/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Render hdfs-site.xml - template: + ansible.builtin.template: src: hdfs-site.xml.j2 dest: "{{ hadoop_client_conf_dir }}/hdfs-site.xml" owner: root diff --git a/roles/hdfs/client/tasks/install.yml b/roles/hdfs/client/tasks/install.yml index c862ae77..1c7df036 100644 --- a/roles/hdfs/client/tasks/install.yml +++ b/roles/hdfs/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hdfs installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: install - name: Render /usr/bin/hdfs command - template: + ansible.builtin.template: src: hdfs-command.j2 dest: /usr/bin/hdfs owner: root diff --git a/roles/hdfs/client/tasks/kerberos.yml b/roles/hdfs/client/tasks/kerberos.yml index 0d479f3a..27c2f52d 100644 --- a/roles/hdfs/client/tasks/kerberos.yml +++ b/roles/hdfs/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hdfs user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure hdfs user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hdfs/common/tasks/install.yml b/roles/hdfs/common/tasks/install.yml index 8198cd75..fd4c34b0 100644 --- a/roles/hdfs/common/tasks/install.yml +++ b/roles/hdfs/common/tasks/install.yml @@ -3,19 +3,19 @@ --- - name: Ensure common hadoop installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: install - name: Ensure hdfs user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ hdfs_user }}" group: "{{ hadoop_group }}" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hadoop_hdfs_pid_dir }}" state: directory owner: "{{ hdfs_user }}" @@ -23,7 +23,7 @@ mode: "755" - name: Template hadoop hdfs tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hadoop-hdfs.conf.j2 dest: /etc/tmpfiles.d/hadoop-hdfs.conf owner: root @@ -31,7 +31,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hadoop_log_dir }}" state: directory group: "{{ hadoop_group }}" diff --git a/roles/hdfs/datanode/tasks/check.yml b/roles/hdfs/datanode/tasks/check.yml index b08b74b0..74b5f7bb 100644 --- a/roles/hdfs/datanode/tasks/check.yml +++ b/roles/hdfs/datanode/tasks/check.yml @@ -3,7 +3,7 @@ --- - name: HDFS datanode component check - Check datanode systemd - service_facts: + ansible.builtin.service_facts: register: dn_systemd_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -11,7 +11,7 @@ failed_when: dn_systemd_res.ansible_facts.services["hadoop-hdfs-datanode.service"].state != 'running' - name: HDFS datanode component check - Check datanode data port - shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_data_port }}" + ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_data_port }}" register: dn_data_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -22,7 +22,7 @@ failed_when: 'dn_data_port_res.rc != 0 or hdfs_check_port_str not in dn_data_port_res.stderr' - name: HDFS datanode component check - Check datanode https port - shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_https_port }}" + ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_https_port }}" register: dn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" diff --git a/roles/hdfs/datanode/tasks/config.yml b/roles/hdfs/datanode/tasks/config.yml index 8df0cac5..3c0d1b2b 100644 --- a/roles/hdfs/datanode/tasks/config.yml +++ b/roles/hdfs/datanode/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_dn_conf_dir }}/" dest: "{{ hadoop_dn_conf_dir }}.{{ ansible_date_time.epoch }}" group: "{{ hadoop_group }}" @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_dn_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_dn_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_dn_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_dn_conf_dir }}/core-site.xml" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Render hdfs-site.xml - template: + ansible.builtin.template: src: hdfs-site.xml.j2 dest: "{{ hadoop_dn_conf_dir }}/hdfs-site.xml" owner: root @@ -49,7 +49,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_dn_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hdfs/datanode/tasks/install.yml b/roles/hdfs/datanode/tasks/install.yml index 00253d9c..732b2d94 100644 --- a/roles/hdfs/datanode/tasks/install.yml +++ b/roles/hdfs/datanode/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hdfs installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: install - name: Create HDFS Datanode parent directories - file: + ansible.builtin.file: path: "{{ item | dirname }}" state: directory owner: "{{ hdfs_user }}" @@ -17,7 +17,7 @@ loop: "{{ hdfs_site['dfs.datanode.data.dir'].split(',') }}" - name: Create HDFS Datanode directory - file: + ansible.builtin.file: path: "{{ item }}" state: directory owner: "{{ hdfs_user }}" @@ -26,7 +26,7 @@ loop: "{{ hdfs_site['dfs.datanode.data.dir'].split(',') }}" - name: Create HDFS Datanode configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_dn_conf_dir }}" state: directory owner: "{{ hdfs_user }}" @@ -34,7 +34,7 @@ mode: "755" - name: Template HDFS Datanode service file - template: + ansible.builtin.template: src: hadoop-hdfs-datanode.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-datanode.service owner: root diff --git a/roles/hdfs/datanode/tasks/jmx-exporter.yml b/roles/hdfs/datanode/tasks/jmx-exporter.yml index a4ebdb83..a9bcf79b 100644 --- a/roles/hdfs/datanode/tasks/jmx-exporter.yml +++ b/roles/hdfs/datanode/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/dn.yml" owner: root diff --git a/roles/hdfs/datanode/tasks/kerberos.yml b/roles/hdfs/datanode/tasks/kerberos.yml index 78e35238..0481db18 100644 --- a/roles/hdfs/datanode/tasks/kerberos.yml +++ b/roles/hdfs/datanode/tasks/kerberos.yml @@ -3,19 +3,19 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: HDFS Datanode keytabs creation block: - name: Ensure hdfs dn user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -26,7 +26,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -40,7 +40,7 @@ - name: HDFS Datanode keytabs check block: - name: Ensure hdfs dn user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -51,7 +51,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hdfs/datanode/tasks/restart.yml b/roles/hdfs/datanode/tasks/restart.yml index c3199635..b06694f6 100644 --- a/roles/hdfs/datanode/tasks/restart.yml +++ b/roles/hdfs/datanode/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HDFS Datanodes - service: + ansible.builtin.service: name: hadoop-hdfs-datanode state: restarted enabled: "{{ hdfs_dn_start_on_boot }}" diff --git a/roles/hdfs/datanode/tasks/ssl-tls.yml b/roles/hdfs/datanode/tasks/ssl-tls.yml index 452127b7..13cfff5a 100644 --- a/roles/hdfs/datanode/tasks/ssl-tls.yml +++ b/roles/hdfs/datanode/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_dn_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hdfs keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure hdfs truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: @@ -37,7 +37,7 @@ truststore_password: "{{ hadoop_truststore_password }}" - name: Ensure hdfs truststore is valid - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: diff --git a/roles/hdfs/datanode/tasks/start.yml b/roles/hdfs/datanode/tasks/start.yml index b6fa3cb3..6741ea1b 100644 --- a/roles/hdfs/datanode/tasks/start.yml +++ b/roles/hdfs/datanode/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start HDFS datanodes - service: + ansible.builtin.service: name: hadoop-hdfs-datanode state: started enabled: "{{ hdfs_dn_start_on_boot }}" diff --git a/roles/hdfs/datanode/tasks/status.yml b/roles/hdfs/datanode/tasks/status.yml index 88c5c975..f1330ac9 100644 --- a/roles/hdfs/datanode/tasks/status.yml +++ b/roles/hdfs/datanode/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-hdfs-datanode is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-datanode.service'].state == "running" quiet: true diff --git a/roles/hdfs/datanode/tasks/stop.yml b/roles/hdfs/datanode/tasks/stop.yml index 6e2b5d17..620b3a92 100644 --- a/roles/hdfs/datanode/tasks/stop.yml +++ b/roles/hdfs/datanode/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop HDFS datanodes - service: + ansible.builtin.service: name: hadoop-hdfs-datanode state: stopped enabled: "{{ hdfs_dn_start_on_boot }}" diff --git a/roles/hdfs/httpfs/tasks/config.yml b/roles/hdfs/httpfs/tasks/config.yml index 8c225462..41e601d9 100644 --- a/roles/hdfs/httpfs/tasks/config.yml +++ b/roles/hdfs/httpfs/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_httpfs_conf_dir }}/" dest: "{{ hadoop_httpfs_conf_dir }}.{{ ansible_date_time.epoch }}" group: "{{ hadoop_group }}" @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_httpfs_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_httpfs_conf_dir }}" - name: Template httpfs-env.sh - template: + ansible.builtin.template: src: httpfs-env.sh.j2 dest: "{{ hadoop_httpfs_conf_dir }}/httpfs-env.sh" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_httpfs_conf_dir }}/log4j.properties" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_httpfs_conf_dir }}/core-site.xml" owner: root @@ -49,7 +49,7 @@ mode: "644" - name: Render hdfs-site.xml - template: + ansible.builtin.template: src: hdfs-site.xml.j2 dest: "{{ hadoop_httpfs_conf_dir }}/hdfs-site.xml" owner: root @@ -57,7 +57,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_httpfs_conf_dir }}/jmxremote.password" owner: root @@ -65,7 +65,7 @@ mode: "644" - name: Render httpfs-site.xml - template: + ansible.builtin.template: src: httpfs-site.xml.j2 dest: "{{ hadoop_httpfs_conf_dir }}/httpfs-site.xml" owner: root diff --git a/roles/hdfs/httpfs/tasks/install.yml b/roles/hdfs/httpfs/tasks/install.yml index 912f68de..f8f30d4f 100644 --- a/roles/hdfs/httpfs/tasks/install.yml +++ b/roles/hdfs/httpfs/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hdfs installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: install - name: Create HDFS HttpFS configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_httpfs_conf_dir }}" state: directory owner: "{{ hdfs_user }}" @@ -16,7 +16,7 @@ mode: "755" - name: Create HDFS HttpFS temporary directory - file: + ansible.builtin.file: path: "{{ httpfs_temp_dir }}" state: directory owner: "{{ hdfs_user }}" @@ -24,7 +24,7 @@ mode: "755" - name: Template HDFS HttpFS service file - template: + ansible.builtin.template: src: hadoop-hdfs-httpfs.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-httpfs.service owner: root diff --git a/roles/hdfs/httpfs/tasks/jmx-exporter.yml b/roles/hdfs/httpfs/tasks/jmx-exporter.yml index 7f125d2d..c0c6d9a2 100644 --- a/roles/hdfs/httpfs/tasks/jmx-exporter.yml +++ b/roles/hdfs/httpfs/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/httpfs.yml" owner: root diff --git a/roles/hdfs/httpfs/tasks/kerberos.yml b/roles/hdfs/httpfs/tasks/kerberos.yml index 4417b872..7372ccf2 100644 --- a/roles/hdfs/httpfs/tasks/kerberos.yml +++ b/roles/hdfs/httpfs/tasks/kerberos.yml @@ -3,18 +3,18 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - block: - name: Ensure httpfs user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -25,7 +25,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -38,7 +38,7 @@ - block: - name: Ensure httpfs user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -49,7 +49,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hdfs/httpfs/tasks/restart.yml b/roles/hdfs/httpfs/tasks/restart.yml index 2b46bcd1..336111c9 100644 --- a/roles/hdfs/httpfs/tasks/restart.yml +++ b/roles/hdfs/httpfs/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HDFS HttpFS - service: + ansible.builtin.service: name: hadoop-hdfs-httpfs state: restarted enabled: "{{ hdfs_httpfs_start_on_boot }}" diff --git a/roles/hdfs/httpfs/tasks/ssl-tls.yml b/roles/hdfs/httpfs/tasks/ssl-tls.yml index a4f5ec67..53ec442b 100644 --- a/roles/hdfs/httpfs/tasks/ssl-tls.yml +++ b/roles/hdfs/httpfs/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_httpfs_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure httpfs keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure httpfs truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hdfs/httpfs/tasks/start.yml b/roles/hdfs/httpfs/tasks/start.yml index 7e5f0773..6137d301 100644 --- a/roles/hdfs/httpfs/tasks/start.yml +++ b/roles/hdfs/httpfs/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start HDFS HttpFS - service: + ansible.builtin.service: name: hadoop-hdfs-httpfs state: started enabled: "{{ hdfs_httpfs_start_on_boot }}" diff --git a/roles/hdfs/httpfs/tasks/status.yml b/roles/hdfs/httpfs/tasks/status.yml index 1dcbe425..2deae213 100644 --- a/roles/hdfs/httpfs/tasks/status.yml +++ b/roles/hdfs/httpfs/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-hdfs-httpfs is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-httpfs.service'].state == "running" quiet: true diff --git a/roles/hdfs/httpfs/tasks/stop.yml b/roles/hdfs/httpfs/tasks/stop.yml index b8bd66a3..2500773c 100644 --- a/roles/hdfs/httpfs/tasks/stop.yml +++ b/roles/hdfs/httpfs/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop HDFS HttpFS - service: + ansible.builtin.service: name: hadoop-hdfs-httpfs state: stopped enabled: "{{ hdfs_httpfs_start_on_boot }}" diff --git a/roles/hdfs/journalnode/tasks/check.yml b/roles/hdfs/journalnode/tasks/check.yml index 56d4afa0..25174cc4 100644 --- a/roles/hdfs/journalnode/tasks/check.yml +++ b/roles/hdfs/journalnode/tasks/check.yml @@ -3,7 +3,7 @@ --- - name: HDFS journalnode component check - Check journalnode systemd - service_facts: + ansible.builtin.service_facts: register: jn_systemd_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -11,7 +11,7 @@ failed_when: jn_systemd_res.ansible_facts.services["hadoop-hdfs-journalnode.service"].state != 'running' - name: HDFS journalnode component check - Check journalnode rpc port - shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_rpc_port }}" + ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_rpc_port }}" register: jn_rpc_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -22,7 +22,7 @@ failed_when: 'jn_rpc_port_res.rc != 0 or hdfs_check_port_str not in jn_rpc_port_res.stderr' - name: HDFS journalnode component check - Check journalnode https port - shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_https_port }}" + ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_https_port }}" register: jn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" diff --git a/roles/hdfs/journalnode/tasks/config.yml b/roles/hdfs/journalnode/tasks/config.yml index 2a7bfe23..eb0df02b 100644 --- a/roles/hdfs/journalnode/tasks/config.yml +++ b/roles/hdfs/journalnode/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_jn_conf_dir }}/" dest: "{{ hadoop_jn_conf_dir }}.{{ ansible_date_time.epoch }}" group: "{{ hadoop_group }}" @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_jn_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_jn_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_jn_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_jn_conf_dir }}/core-site.xml" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Render hdfs-site.xml - template: + ansible.builtin.template: src: hdfs-site.xml.j2 dest: "{{ hadoop_jn_conf_dir }}/hdfs-site.xml" owner: root @@ -49,7 +49,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_jn_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hdfs/journalnode/tasks/install.yml b/roles/hdfs/journalnode/tasks/install.yml index 744c8848..b7047648 100644 --- a/roles/hdfs/journalnode/tasks/install.yml +++ b/roles/hdfs/journalnode/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hdfs installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: install - name: Create HDFS Journalnode directory - file: + ansible.builtin.file: path: "{{ hdfs_site['dfs.journalnode.edits.dir'] }}" state: directory owner: "{{ hdfs_user }}" @@ -16,7 +16,7 @@ mode: "700" - name: Create HDFS Journalnode configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_jn_conf_dir }}" state: directory owner: "{{ hdfs_user }}" @@ -24,7 +24,7 @@ mode: "755" - name: Template HDFS Journalnode service file - template: + ansible.builtin.template: src: hadoop-hdfs-journalnode.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-journalnode.service owner: root diff --git a/roles/hdfs/journalnode/tasks/jmx-exporter.yml b/roles/hdfs/journalnode/tasks/jmx-exporter.yml index b259bdc4..1ff83ed6 100644 --- a/roles/hdfs/journalnode/tasks/jmx-exporter.yml +++ b/roles/hdfs/journalnode/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/jn.yml" owner: root diff --git a/roles/hdfs/journalnode/tasks/kerberos.yml b/roles/hdfs/journalnode/tasks/kerberos.yml index 2e7cf63e..08716d15 100644 --- a/roles/hdfs/journalnode/tasks/kerberos.yml +++ b/roles/hdfs/journalnode/tasks/kerberos.yml @@ -3,14 +3,14 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: HDFS JournalNode keytabs creation block: - name: Ensure hdfs jn user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -21,7 +21,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -35,7 +35,7 @@ - name: HDFS JournalNode keytabs check block: - name: Ensure hdfs jn user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -46,7 +46,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hdfs/journalnode/tasks/restart.yml b/roles/hdfs/journalnode/tasks/restart.yml index cf7f6563..0b714df2 100644 --- a/roles/hdfs/journalnode/tasks/restart.yml +++ b/roles/hdfs/journalnode/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart HDFS Journalnodes - service: + ansible.builtin.service: name: hadoop-hdfs-journalnode state: restarted enabled: "{{ hdfs_jn_start_on_boot }}" diff --git a/roles/hdfs/journalnode/tasks/ssl-tls.yml b/roles/hdfs/journalnode/tasks/ssl-tls.yml index d213c1c0..9ddb9023 100644 --- a/roles/hdfs/journalnode/tasks/ssl-tls.yml +++ b/roles/hdfs/journalnode/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_jn_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hdfs keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure hdfs truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hdfs/journalnode/tasks/start.yml b/roles/hdfs/journalnode/tasks/start.yml index ec7c10f6..3b9bbfb8 100644 --- a/roles/hdfs/journalnode/tasks/start.yml +++ b/roles/hdfs/journalnode/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start journalnodes - service: + ansible.builtin.service: name: hadoop-hdfs-journalnode state: started enabled: "{{ hdfs_jn_start_on_boot }}" diff --git a/roles/hdfs/journalnode/tasks/status.yml b/roles/hdfs/journalnode/tasks/status.yml index 8d703959..1965c5d5 100644 --- a/roles/hdfs/journalnode/tasks/status.yml +++ b/roles/hdfs/journalnode/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-hdfs-journalnode is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-journalnode.service'].state == "running" quiet: true diff --git a/roles/hdfs/journalnode/tasks/stop.yml b/roles/hdfs/journalnode/tasks/stop.yml index e40d377a..af3a867f 100644 --- a/roles/hdfs/journalnode/tasks/stop.yml +++ b/roles/hdfs/journalnode/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop journalnodes - service: + ansible.builtin.service: name: hadoop-hdfs-journalnode state: stopped enabled: "{{ hdfs_jn_start_on_boot }}" diff --git a/roles/hdfs/namenode/tasks/check.yml b/roles/hdfs/namenode/tasks/check.yml index f0b76762..af6ca44e 100644 --- a/roles/hdfs/namenode/tasks/check.yml +++ b/roles/hdfs/namenode/tasks/check.yml @@ -3,7 +3,7 @@ --- - name: HDFS namenode component check - Check namenode systemd - service_facts: + ansible.builtin.service_facts: register: nn_systemd_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -11,7 +11,7 @@ failed_when: nn_systemd_res.ansible_facts.services["hadoop-hdfs-namenode.service"].state != 'running' - name: HDFS namenode component check - Check namenode zkfc systemd - service_facts: + ansible.builtin.service_facts: register: nn_zkfc_systemd_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -19,7 +19,7 @@ failed_when: nn_zkfc_systemd_res.ansible_facts.services["hadoop-hdfs-zkfc.service"].state != 'running' - name: HDFS namenode component check - Check namenode rpc port - shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_rpc_port }}" + ansible.builtin.shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_rpc_port }}" register: nn_rpc_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -30,7 +30,7 @@ failed_when: 'nn_rpc_port_res.rc != 0 or hdfs_check_port_str not in nn_rpc_port_res.stderr' - name: HDFS namenode component check - Check namenode https port - shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_https_port }}" + ansible.builtin.shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_https_port }}" register: nn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -42,14 +42,14 @@ - name: HDFS namenode component check - "kinit" become_user: "{{ hdfs_user }}" - shell: /bin/kinit -kt /etc/security/keytabs/nn.service.keytab "nn/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }}" + ansible.builtin.shell: /bin/kinit -kt /etc/security/keytabs/nn.service.keytab "nn/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }}" changed_when: false - name: HDFS namenode component check - Check namenode safemode & state become_user: "{{ hdfs_user }}" block: - name: HDFS namenode component check - Check nn safemode - shell: hdfs dfsadmin -safemode get | grep "{{ ansible_hostname }}" + ansible.builtin.shell: hdfs dfsadmin -safemode get | grep "{{ ansible_hostname }}" register: nn_safemode_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -59,7 +59,7 @@ - '"Safe mode is OFF" in nn_safemode_res.stdout' failed_when: 'nn_safemode_res.rc != 0 or "Safe mode is OFF" not in nn_safemode_res.stdout' - name: HDFS namenode component check - Check nn state (active & standby) - shell: hdfs haadmin -getAllServiceState + ansible.builtin.shell: hdfs haadmin -getAllServiceState register: nn_state_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -71,11 +71,11 @@ failed_when: 'nn_state_res.rc != 0 or "active" not in nn_state_res.stdout or "standby" not in nn_state_res.stdout' rescue: - name: HDFS namenode component check - "kdestroy" - shell: /bin/kdestroy + ansible.builtin.shell: /bin/kdestroy changed_when: false failed_when: true - name: HDFS namenode component check - "kdestroy" become_user: "{{ hdfs_user }}" - shell: /bin/kdestroy + ansible.builtin.shell: /bin/kdestroy changed_when: false diff --git a/roles/hdfs/namenode/tasks/config.yml b/roles/hdfs/namenode/tasks/config.yml index 19bf3d2e..05f262b4 100644 --- a/roles/hdfs/namenode/tasks/config.yml +++ b/roles/hdfs/namenode/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_nn_conf_dir }}/" dest: "{{ hadoop_nn_conf_dir }}.{{ ansible_date_time.epoch }}" group: "{{ hadoop_group }}" @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_nn_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_nn_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_nn_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Template HDFS ZKFC service file - template: + ansible.builtin.template: src: hadoop-hdfs-zkfc.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-zkfc.service owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_nn_conf_dir }}/core-site.xml" owner: root @@ -49,7 +49,7 @@ mode: "644" - name: Render hdfs-site.xml - template: + ansible.builtin.template: src: hdfs-site.xml.j2 dest: "{{ hadoop_nn_conf_dir }}/hdfs-site.xml" owner: root @@ -57,7 +57,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_nn_conf_dir }}/jmxremote.password" owner: root @@ -65,7 +65,7 @@ mode: "644" - name: Render dfs.exclude file - template: + ansible.builtin.template: src: dfs.exclude.j2 dest: "{{ hdfs_site['dfs.hosts.exclude'] }}" owner: root diff --git a/roles/hdfs/namenode/tasks/formatzk.yml b/roles/hdfs/namenode/tasks/formatzk.yml index f20ea608..264c1e55 100644 --- a/roles/hdfs/namenode/tasks/formatzk.yml +++ b/roles/hdfs/namenode/tasks/formatzk.yml @@ -7,6 +7,6 @@ become: true register: format_zk become_user: "{{ hdfs_user }}" - shell: "echo -e N | {{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_root_conf_dir }}/conf.nn zkfc -formatZK" + ansible.builtin.shell: "echo -e N | {{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_root_conf_dir }}/conf.nn zkfc -formatZK" changed_when: ("Successfully created /hadoop-ha/") in format_zk.stderr failed_when: ("FATAL ERROR") in format_zk.stdout diff --git a/roles/hdfs/namenode/tasks/install.yml b/roles/hdfs/namenode/tasks/install.yml index e649c2e9..58a1f44e 100644 --- a/roles/hdfs/namenode/tasks/install.yml +++ b/roles/hdfs/namenode/tasks/install.yml @@ -3,26 +3,26 @@ --- - name: Ensure common hdfs installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hdfs.common tasks_from: install - name: Create HDFS Namenode directory - file: + ansible.builtin.file: path: "{{ hdfs_site['dfs.namenode.name.dir'] }}" state: directory group: '{{ hadoop_group }}' owner: '{{ hdfs_user }}' - name: Create HDFS Namenode configuration directory - file: + ansible.builtin.file: path: '{{ hadoop_nn_conf_dir }}' state: directory group: '{{ hadoop_group }}' owner: '{{ hdfs_user }}' - name: Template HDFS Namenode service file - template: + ansible.builtin.template: src: hadoop-hdfs-namenode.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-namenode.service notify: diff --git a/roles/hdfs/namenode/tasks/jmx-exporter.yml b/roles/hdfs/namenode/tasks/jmx-exporter.yml index 42ac1cc2..d4da4747 100644 --- a/roles/hdfs/namenode/tasks/jmx-exporter.yml +++ b/roles/hdfs/namenode/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/nn.yml" owner: root @@ -19,7 +19,7 @@ mode: "644" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/zkfc.yml" owner: root diff --git a/roles/hdfs/namenode/tasks/kerberos.yml b/roles/hdfs/namenode/tasks/kerberos.yml index e2486a5b..efc51991 100644 --- a/roles/hdfs/namenode/tasks/kerberos.yml +++ b/roles/hdfs/namenode/tasks/kerberos.yml @@ -3,17 +3,17 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Template krb5 jaas - template: + ansible.builtin.template: src: krb5JAASnn.conf.j2 dest: "{{ hadoop_nn_conf_dir }}/krb5JAASnn.conf" owner: root @@ -23,7 +23,7 @@ - name: HDFS NameNode keytabs creation block: - name: Ensure hdfs nn user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -34,7 +34,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -48,7 +48,7 @@ - name: HDFS NameNode keytabs check block: - name: Ensure hdfs nn user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -59,7 +59,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hdfs/namenode/tasks/restart.yml b/roles/hdfs/namenode/tasks/restart.yml index 3e5a064b..38d287e8 100644 --- a/roles/hdfs/namenode/tasks/restart.yml +++ b/roles/hdfs/namenode/tasks/restart.yml @@ -3,13 +3,13 @@ --- - name: Restart HDFS Namenodes - service: + ansible.builtin.service: name: hadoop-hdfs-namenode state: restarted enabled: "{{ hdfs_nn_start_on_boot }}" - name: Restart HDFS ZKFCs - service: + ansible.builtin.service: name: hadoop-hdfs-zkfc state: restarted enabled: "{{ hdfs_zkfc_start_on_boot }}" diff --git a/roles/hdfs/namenode/tasks/ssl-tls.yml b/roles/hdfs/namenode/tasks/ssl-tls.yml index edda3f02..45dc1281 100644 --- a/roles/hdfs/namenode/tasks/ssl-tls.yml +++ b/roles/hdfs/namenode/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_nn_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Render ssl-client.xml - template: + ansible.builtin.template: src: ssl-client.xml.j2 dest: "{{ hadoop_nn_conf_dir }}/ssl-client.xml" owner: root @@ -19,7 +19,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -29,7 +29,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure hdfs keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -37,7 +37,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure hdfs truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hdfs/namenode/tasks/start_active_nn.yml b/roles/hdfs/namenode/tasks/start_active_nn.yml index 6721ff8f..d885dbf4 100644 --- a/roles/hdfs/namenode/tasks/start_active_nn.yml +++ b/roles/hdfs/namenode/tasks/start_active_nn.yml @@ -5,18 +5,18 @@ - name: Format namenode become: true become_user: "{{ hdfs_user }}" - command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_root_conf_dir }}/conf.nn namenode -format" + ansible.builtin.command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_root_conf_dir }}/conf.nn namenode -format" args: creates: "{{ hdfs_site['dfs.namenode.name.dir'] }}/current" - name: Start namenode - service: + ansible.builtin.service: name: hadoop-hdfs-namenode state: started enabled: "{{ hdfs_nn_start_on_boot }}" - name: Start zkfc - service: + ansible.builtin.service: name: hadoop-hdfs-zkfc state: started enabled: "{{ hdfs_zkfc_start_on_boot }}" diff --git a/roles/hdfs/namenode/tasks/start_standby_nn.yml b/roles/hdfs/namenode/tasks/start_standby_nn.yml index a490d114..4a767334 100644 --- a/roles/hdfs/namenode/tasks/start_standby_nn.yml +++ b/roles/hdfs/namenode/tasks/start_standby_nn.yml @@ -5,25 +5,25 @@ - name: Bootstrap standby namenode become: true become_user: "{{ hdfs_user }}" - command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config /etc/hadoop/conf.nn namenode -bootstrapStandby -nonInteractive" + ansible.builtin.command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config /etc/hadoop/conf.nn namenode -bootstrapStandby -nonInteractive" args: creates: "{{ hdfs_site['dfs.namenode.name.dir'] }}/current" - name: Set hdfs folder owner - file: + ansible.builtin.file: path: "{{ hadoop_hdfs_dir }}" owner: "{{ hdfs_user }}" group: "{{ hadoop_group }}" recurse: true - name: Start standby namenode - service: + ansible.builtin.service: name: hadoop-hdfs-namenode state: started enabled: "{{ hdfs_nn_start_on_boot }}" - name: Start zkfc - service: + ansible.builtin.service: name: hadoop-hdfs-zkfc state: started enabled: "{{ hdfs_zkfc_start_on_boot }}" diff --git a/roles/hdfs/namenode/tasks/status.yml b/roles/hdfs/namenode/tasks/status.yml index 443c0c29..c3f354a5 100644 --- a/roles/hdfs/namenode/tasks/status.yml +++ b/roles/hdfs/namenode/tasks/status.yml @@ -3,16 +3,16 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-hdfs-namenode is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-namenode.service'].state == "running" quiet: true - name: Assert hadoop-hdfs-zkfc is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-zkfc.service'].state == "running" quiet: true diff --git a/roles/hdfs/namenode/tasks/stop.yml b/roles/hdfs/namenode/tasks/stop.yml index 6a85ff55..16ff66b6 100644 --- a/roles/hdfs/namenode/tasks/stop.yml +++ b/roles/hdfs/namenode/tasks/stop.yml @@ -3,13 +3,13 @@ --- - name: Stop namenode - service: + ansible.builtin.service: name: hadoop-hdfs-namenode state: stopped enabled: "{{ hdfs_nn_start_on_boot }}" - name: Stop zkfc - service: + ansible.builtin.service: name: hadoop-hdfs-zkfc state: stopped enabled: "{{ hdfs_zkfc_start_on_boot }}" diff --git a/roles/hdfs/ranger/tasks/check.yml b/roles/hdfs/ranger/tasks/check.yml index e10eaa37..68f7cbf4 100644 --- a/roles/hdfs/ranger/tasks/check.yml +++ b/roles/hdfs/ranger/tasks/check.yml @@ -4,7 +4,7 @@ --- - name: HDFS ranger component check - Get ranger admin api "exportAudit" run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_hdfs_install_properties.POLICY_MGR_URL }}/service/assets/exportAudit" method: GET force_basic_auth: true @@ -22,7 +22,7 @@ - name: HDFS ranger component check - Check ranger plugin sync status run_once: true - assert: + ansible.builtin.assert: that: | "{{ export_audit.json.vXPolicyExportAudits | selectattr('repositoryName','==',ranger_hdfs_install_properties.REPOSITORY_NAME) | diff --git a/roles/hdfs/ranger/tasks/config.yml b/roles/hdfs/ranger/tasks/config.yml index 920cec84..c788a21d 100644 --- a/roles/hdfs/ranger/tasks/config.yml +++ b/roles/hdfs/ranger/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: install_hdfs.properties.j2 dest: "{{ ranger_hdfs_install_dir }}/install.properties" owner: root @@ -15,26 +15,26 @@ # TODO: find a better way to do this - name: Backup {{ hadoop_install_dir }}/etc/hadoop - command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk + ansible.builtin.command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk args: creates: "{{ hadoop_install_dir }}/etc/hadoop.bk" - name: Create symbolic link from etc/hadoop in {{ hadoop_install_dir }} to actual Namenode config dir - file: + ansible.builtin.file: src: "{{ hadoop_nn_conf_dir }}" dest: "{{ hadoop_install_dir }}/etc/hadoop" state: link # We also need to fix the path of the ranger-policymgr-ssl.xml containing the trustore properties in ranger-hdfs-security.xml - name: Fix the path of ranger-policymgr-ssl.xml in ranger-hdfs-security-changes.cfg - lineinfile: + ansible.builtin.lineinfile: path: "{{ ranger_hdfs_install_dir }}/install/conf.templates/enable/ranger-hdfs-security-changes.cfg" regexp: '^ranger.plugin.hdfs.policy.rest.ssl.config.file\s+([^ ]+) (.*)$' line: 'ranger.plugin.hdfs.policy.rest.ssl.config.file {{ hadoop_nn_conf_dir }}/ranger-policymgr-ssl.xml \2' backrefs: true - name: Run enable-hdfs-plugin.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./enable-hdfs-plugin.sh args: diff --git a/roles/hdfs/ranger/tasks/init.yml b/roles/hdfs/ranger/tasks/init.yml index 84f5ca9c..d48bc8c0 100644 --- a/roles/hdfs/ranger/tasks/init.yml +++ b/roles/hdfs/ranger/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create HDFS service run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_hdfs_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: diff --git a/roles/hdfs/ranger/tasks/install.yml b/roles/hdfs/ranger/tasks/install.yml index a9049442..1ec9b532 100644 --- a/roles/hdfs/ranger/tasks/install.yml +++ b/roles/hdfs/ranger/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ ranger_hdfs_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_hdfs_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ ranger_hdfs_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_hdfs_dist_file }}" dest: "{{ hadoop_root_dir }}" group: root @@ -22,7 +22,7 @@ creates: "{{ hadoop_root_dir }}/{{ ranger_hdfs_release }}" - name: Ensure right permissions on ranger libs - file: + ansible.builtin.file: path: "{{ hadoop_root_dir }}/{{ ranger_hdfs_release }}" owner: root group: root @@ -31,7 +31,7 @@ state: directory - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ hadoop_root_dir }}/{{ ranger_hdfs_release }}" dest: "{{ ranger_hdfs_install_dir }}" state: link diff --git a/roles/hive/client/tasks/config.yml b/roles/hive/client/tasks/config.yml index dabbfe5c..f0c1e194 100644 --- a/roles/hive/client/tasks/config.yml +++ b/roles/hive/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hive_client_conf_dir }}/" dest: "{{ hive_client_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Create hive credentials store - command: >- + ansible.builtin.command: >- {{ hadoop_home }}/bin/hadoop credential create javax.jdo.option.ConnectionPassword -value '{{ hive_ms_db_password }}' @@ -24,13 +24,13 @@ no_log: true - name: Ensure hive credentials store is 600 and owned by hive - file: + ansible.builtin.file: path: "{{ hive_client_credentials_store_path }}" mode: "600" owner: "{{ hive_user }}" - name: Template hive-env.sh - template: + ansible.builtin.template: src: hive-env.sh.j2 dest: "{{ hive_client_conf_dir }}/hive-env.sh" owner: root @@ -38,7 +38,7 @@ mode: "755" - name: Template beeline-log4j2.properties - template: + ansible.builtin.template: src: beeline-log4j2.properties.j2 dest: "{{ hive_client_conf_dir }}/beeline-log4j2.properties" owner: root @@ -46,7 +46,7 @@ mode: "644" - name: Template hive-site.xml - template: + ansible.builtin.template: src: hive-site.xml.j2 dest: "{{ hive_client_conf_dir }}/hive-site.xml" owner: root @@ -54,7 +54,7 @@ mode: "644" - name: Template beeline-site.xml - template: + ansible.builtin.template: src: beeline-site.xml.j2 dest: "{{ hive_client_conf_dir }}/beeline-site.xml" owner: root @@ -62,7 +62,7 @@ mode: "644" - name: Template tez-site.xml - template: + ansible.builtin.template: src: tez-site.xml.j2 dest: "{{ hive_client_conf_dir }}/tez-site.xml" owner: root diff --git a/roles/hive/client/tasks/install.yml b/roles/hive/client/tasks/install.yml index b4e4f5a1..bb1e72c9 100644 --- a/roles/hive/client/tasks/install.yml +++ b/roles/hive/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hive installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: install_hive - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hive_client_conf_dir }}" state: directory owner: "{{ hive_user }}" @@ -16,7 +16,7 @@ mode: "755" - name: Render /usr/bin/hive command - template: + ansible.builtin.template: src: hive-command.j2 dest: /usr/bin/hive owner: root @@ -24,7 +24,7 @@ mode: "755" - name: Render /usr/bin/beeline command - template: + ansible.builtin.template: src: beeline-command.j2 dest: /usr/bin/beeline owner: root diff --git a/roles/hive/client/tasks/kerberos.yml b/roles/hive/client/tasks/kerberos.yml index bd8009cf..14a1046a 100644 --- a/roles/hive/client/tasks/kerberos.yml +++ b/roles/hive/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hive user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure hive user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hive/client/tasks/ssl-tls.yml b/roles/hive/client/tasks/ssl-tls.yml index 4db9ecd4..b6d292c0 100644 --- a/roles/hive/client/tasks/ssl-tls.yml +++ b/roles/hive/client/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure hive keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -11,7 +11,7 @@ keystore_password: "{{ hive_keystore_password }}" - name: Ensure hive truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hive/common/tasks/hdfs_init.yml b/roles/hive/common/tasks/hdfs_init.yml index b5a548ea..1bdb9d0f 100644 --- a/roles/hive/common/tasks/hdfs_init.yml +++ b/roles/hive/common/tasks/hdfs_init.yml @@ -47,13 +47,13 @@ - name: Kinit for hdfs run_once: true - command: kinit -kt /etc/security/keytabs/hdfs.headless.keytab {{ hdfs_headless_principal }}@{{ realm }} + ansible.builtin.command: kinit -kt /etc/security/keytabs/hdfs.headless.keytab {{ hdfs_headless_principal }}@{{ realm }} become: true become_user: "{{ hdfs_user }}" changed_when: false - name: Upload {{ tez_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ tez_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -63,7 +63,7 @@ - name: Put tez release to hdfs run_once: true - command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_conf_dir }} dfs -put {{ binaries_upload_dir }}/{{ tez_dist_file }} /tdp/tez" + ansible.builtin.command: "{{ hadoop_root_dir }}/hadoop/bin/hdfs --config {{ hadoop_conf_dir }} dfs -put {{ binaries_upload_dir }}/{{ tez_dist_file }} /tdp/tez" become: true become_user: hdfs register: hdfs_put_tez diff --git a/roles/hive/common/tasks/hive_yarn_user.yml b/roles/hive/common/tasks/hive_yarn_user.yml index 14ea5d7c..562bf7fd 100644 --- a/roles/hive/common/tasks/hive_yarn_user.yml +++ b/roles/hive/common/tasks/hive_yarn_user.yml @@ -3,7 +3,7 @@ --- - name: Ensure hive user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ hive_user }}" diff --git a/roles/hive/common/tasks/init_schema.yml b/roles/hive/common/tasks/init_schema.yml index b67267e1..ee3faf2e 100644 --- a/roles/hive/common/tasks/init_schema.yml +++ b/roles/hive/common/tasks/init_schema.yml @@ -3,7 +3,7 @@ --- - name: Validate Hive Metastore schema - command: >- + ansible.builtin.command: >- {{ hive_install_dir }}/bin/hive \ --config {{ hive_ms_conf_dir }} \ --service metaSchemaTool \ @@ -20,7 +20,7 @@ (hive_validate.rc == 1 and 'Failed to get schema version' not in hive_validate.stderr) - name: Hive Metastore initSchema - command: >- + ansible.builtin.command: >- {{ hive_install_dir }}/bin/hive \ --config {{ hive_ms_conf_dir }} \ --service metaSchemaTool \ diff --git a/roles/hive/common/tasks/install_hive.yml b/roles/hive/common/tasks/install_hive.yml index bab40277..73f8f1be 100644 --- a/roles/hive/common/tasks/install_hive.yml +++ b/roles/hive/common/tasks/install_hive.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ hive_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ hive_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ hive_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ hive_dist_file }}" dest: "{{ hive_root_dir }}" owner: root @@ -22,7 +22,7 @@ creates: "{{ hive_root_dir }}/{{ hive_release }}" - name: Ensure hive installation permissions - file: + ansible.builtin.file: path: "{{ hive_root_dir }}/{{ hive_release }}" owner: root group: root @@ -31,20 +31,20 @@ recurse: true - name: Create symbolic link to Hive installation - file: + ansible.builtin.file: src: "{{ hive_root_dir }}/{{ hive_release }}" dest: "{{ hive_install_dir }}" state: link - name: Ensure hive user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ hive_user }}" group: "{{ hadoop_group }}" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hive_pid_dir }}" state: directory owner: "{{ hive_user }}" @@ -52,7 +52,7 @@ mode: "755" - name: Template hive tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hive-server2.conf.j2 dest: /etc/tmpfiles.d/hive-server2.conf owner: root @@ -60,7 +60,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hive_log_dir }}" state: directory owner: "{{ hive_user }}" @@ -68,7 +68,7 @@ mode: "750" - name: Upload {{ tez_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ tez_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -77,7 +77,7 @@ diff: false - name: Create Tez extract dir - file: + ansible.builtin.file: path: "{{ tez_root_dir }}/{{ tez_release }}" state: directory owner: root @@ -85,7 +85,7 @@ mode: "755" - name: Extract {{ tez_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ tez_dist_file }}" dest: "{{ tez_root_dir }}/{{ tez_release }}" owner: root @@ -95,7 +95,7 @@ creates: "{{ tez_root_dir }}/{{ tez_release }}/lib" - name: Create symbolic link to Tez installation - file: + ansible.builtin.file: src: "{{ tez_root_dir }}/{{ tez_release }}" dest: "{{ tez_install_dir }}" state: link @@ -103,20 +103,20 @@ # NOTE: If this jar is not moved, logging to /var/log/hive/hiveserver2.log does not happen and everything gets sent to Console output # TODO: Find a better way to deal with this issue - name: Remove lib/slf4j-log4j12-1.7.10.jar - file: + ansible.builtin.file: path: "{{ tez_install_dir }}/lib/slf4j-log4j12-1.7.10.jar" state: absent # NOTE: If this jar is not moved, Cli can not be executed # TODO: Find a better way to deal with this issue - name: Remove lib/jline-0.9.94.jar - file: + ansible.builtin.file: path: "{{ tez_install_dir }}/lib/jline-0.9.94.jar" state: absent # NOTE: templating schemaTool using standalone metastore class because of HIVE-26402 - name: Template metaSchemaTool.sh - template: + ansible.builtin.template: src: metaSchemaTool.sh.j2 dest: "{{ hive_install_dir }}/bin/ext/metaSchemaTool.sh" owner: root diff --git a/roles/hive/hiveserver2/tasks/config.yml b/roles/hive/hiveserver2/tasks/config.yml index 3a3b1e92..7d19e3e7 100644 --- a/roles/hive/hiveserver2/tasks/config.yml +++ b/roles/hive/hiveserver2/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hive_s2_conf_dir }}/" dest: "{{ hive_s2_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hive-env.sh - template: + ansible.builtin.template: src: hive-env.sh.j2 dest: "{{ hive_s2_conf_dir }}/hive-env.sh" owner: root @@ -22,7 +22,7 @@ mode: "644" - name: Template hive-log4j2.properties - template: + ansible.builtin.template: src: hive-log4j2.properties.j2 dest: "{{ hive_s2_conf_dir }}/hive-log4j2.properties" owner: root @@ -32,7 +32,7 @@ hive_log_file: "{{ hive_s2_log_file }}" - name: Template hive-site.xml - template: + ansible.builtin.template: src: hive-site.xml.j2 dest: "{{ hive_s2_conf_dir }}/hive-site.xml" owner: root @@ -40,7 +40,7 @@ mode: "644" - name: Template hiveserver2-site.xml - template: + ansible.builtin.template: src: hiveserver2-site.xml.j2 dest: "{{ hive_s2_conf_dir }}/hiveserver2-site.xml" owner: root @@ -48,7 +48,7 @@ mode: "644" - name: Template tez-site.xml - template: + ansible.builtin.template: src: tez-site.xml.j2 dest: "{{ hive_s2_conf_dir }}/tez-site.xml" owner: root @@ -56,7 +56,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hive_s2_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hive/hiveserver2/tasks/install.yml b/roles/hive/hiveserver2/tasks/install.yml index 68344e7a..f48ca152 100644 --- a/roles/hive/hiveserver2/tasks/install.yml +++ b/roles/hive/hiveserver2/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hive installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: install_hive - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hive_s2_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template Hiveserver2 start script - template: + ansible.builtin.template: src: start-hiveserver2.sh.j2 dest: "{{ hive_install_dir }}/bin/start-hiveserver2.sh" owner: root @@ -24,7 +24,7 @@ mode: "755" - name: Template Hiveserver2 service file - template: + ansible.builtin.template: src: hive-server2.service.j2 dest: /usr/lib/systemd/system/hive-server2.service owner: root diff --git a/roles/hive/hiveserver2/tasks/jmx-exporter.yml b/roles/hive/hiveserver2/tasks/jmx-exporter.yml index 0fed0753..d922b52a 100644 --- a/roles/hive/hiveserver2/tasks/jmx-exporter.yml +++ b/roles/hive/hiveserver2/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/hs2.yml" owner: root diff --git a/roles/hive/hiveserver2/tasks/kerberos.yml b/roles/hive/hiveserver2/tasks/kerberos.yml index 20351f9c..aa646b4e 100644 --- a/roles/hive/hiveserver2/tasks/kerberos.yml +++ b/roles/hive/hiveserver2/tasks/kerberos.yml @@ -3,14 +3,14 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: HiveServer2 keytabs creation block: - name: Ensure hive user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -21,7 +21,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -35,7 +35,7 @@ - name: HiveServer2 keytabs cehck block: - name: Ensure hive's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -46,7 +46,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hive/hiveserver2/tasks/restart.yml b/roles/hive/hiveserver2/tasks/restart.yml index 68bc9f69..4ec5788e 100644 --- a/roles/hive/hiveserver2/tasks/restart.yml +++ b/roles/hive/hiveserver2/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Hive Server 2 - service: + ansible.builtin.service: name: hive-server2 state: restarted enabled: "{{ hiveserver2_start_on_boot }}" diff --git a/roles/hive/hiveserver2/tasks/ssl-tls.yml b/roles/hive/hiveserver2/tasks/ssl-tls.yml index 4db9ecd4..b6d292c0 100644 --- a/roles/hive/hiveserver2/tasks/ssl-tls.yml +++ b/roles/hive/hiveserver2/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure hive keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -11,7 +11,7 @@ keystore_password: "{{ hive_keystore_password }}" - name: Ensure hive truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/hive/hiveserver2/tasks/start.yml b/roles/hive/hiveserver2/tasks/start.yml index 83b0e37f..8913fc97 100644 --- a/roles/hive/hiveserver2/tasks/start.yml +++ b/roles/hive/hiveserver2/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Hive Server 2 - service: + ansible.builtin.service: name: hive-server2 state: started enabled: "{{ hiveserver2_start_on_boot }}" diff --git a/roles/hive/hiveserver2/tasks/status.yml b/roles/hive/hiveserver2/tasks/status.yml index 0e46439a..20e85aeb 100644 --- a/roles/hive/hiveserver2/tasks/status.yml +++ b/roles/hive/hiveserver2/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hive-server2 is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hive-server2.service'].state == "running" quiet: true diff --git a/roles/hive/hiveserver2/tasks/stop.yml b/roles/hive/hiveserver2/tasks/stop.yml index f3777fe5..eb6695ae 100644 --- a/roles/hive/hiveserver2/tasks/stop.yml +++ b/roles/hive/hiveserver2/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Hive Server 2 - service: + ansible.builtin.service: name: hive-server2 state: stopped enabled: "{{ hiveserver2_start_on_boot }}" diff --git a/roles/hive/metastore/tasks/config.yml b/roles/hive/metastore/tasks/config.yml index a79ab64f..5aeb25e7 100644 --- a/roles/hive/metastore/tasks/config.yml +++ b/roles/hive/metastore/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hive_ms_conf_dir }}/" dest: "{{ hive_ms_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Create hive credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -26,7 +26,7 @@ value: "{{ hive_ms_db_password }}" - name: Template hive-env.sh - template: + ansible.builtin.template: src: hive-env.sh.j2 dest: "{{ hive_ms_conf_dir }}/hive-env.sh" owner: root @@ -34,7 +34,7 @@ mode: "644" - name: Template hive-log4j2.properties - template: + ansible.builtin.template: src: hive-log4j2.properties.j2 dest: "{{ hive_ms_conf_dir }}/hive-log4j2.properties" owner: root @@ -44,7 +44,7 @@ hive_log_file: "{{ hive_ms_log_file }}" - name: Template hive-site.xml - template: + ansible.builtin.template: src: hive-site.xml.j2 dest: "{{ hive_ms_conf_dir }}/hive-site.xml" owner: root @@ -52,7 +52,7 @@ mode: "644" - name: Template metastore-site.xml - template: + ansible.builtin.template: src: metastore-site.xml.j2 dest: "{{ hive_ms_conf_dir }}/metastore-site.xml" owner: root @@ -60,7 +60,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hive_ms_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/hive/metastore/tasks/install.yml b/roles/hive/metastore/tasks/install.yml index ed83f0d2..6678b153 100644 --- a/roles/hive/metastore/tasks/install.yml +++ b/roles/hive/metastore/tasks/install.yml @@ -3,23 +3,23 @@ --- - name: Ensure common hive installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hive.common tasks_from: install_hive - name: Install jdbc connector - package: + ansible.builtin.package: name: "{{ hive_jdbc_connector_package }}" state: present - name: Create a symbolic link to jdbc.jar - file: + ansible.builtin.file: src: /usr/share/java/{{ hive_jdbc_connector_package }}.jar dest: "{{ hive_install_dir }}/lib/{{ hive_jdbc_connector_package }}.jar" state: link - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hive_ms_conf_dir }}" state: directory owner: root @@ -27,7 +27,7 @@ mode: "755" - name: Template Metastore start script - template: + ansible.builtin.template: src: start-metastore.sh.j2 dest: "{{ hive_install_dir }}/bin/start-metastore.sh" owner: root @@ -35,7 +35,7 @@ mode: "755" - name: Template HiveMetastore service file - template: + ansible.builtin.template: src: hive-metastore.service.j2 dest: /usr/lib/systemd/system/hive-metastore.service owner: root diff --git a/roles/hive/metastore/tasks/jmx-exporter.yml b/roles/hive/metastore/tasks/jmx-exporter.yml index 2a7a8d3a..e190f3b4 100644 --- a/roles/hive/metastore/tasks/jmx-exporter.yml +++ b/roles/hive/metastore/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/hms.yml" owner: root diff --git a/roles/hive/metastore/tasks/kerberos.yml b/roles/hive/metastore/tasks/kerberos.yml index 60326d43..f9815f1c 100644 --- a/roles/hive/metastore/tasks/kerberos.yml +++ b/roles/hive/metastore/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hive user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure hive user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/hive/metastore/tasks/restart.yml b/roles/hive/metastore/tasks/restart.yml index 439b3802..fbc35920 100644 --- a/roles/hive/metastore/tasks/restart.yml +++ b/roles/hive/metastore/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Hive Metastore - service: + ansible.builtin.service: name: hive-metastore state: restarted enabled: "{{ hivemetastore_start_on_boot }}" diff --git a/roles/hive/metastore/tasks/start.yml b/roles/hive/metastore/tasks/start.yml index 3838e5e9..3cf9392d 100644 --- a/roles/hive/metastore/tasks/start.yml +++ b/roles/hive/metastore/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Hive Metastore - service: + ansible.builtin.service: name: hive-metastore state: started enabled: "{{ hivemetastore_start_on_boot }}" diff --git a/roles/hive/metastore/tasks/status.yml b/roles/hive/metastore/tasks/status.yml index 7249eb81..f7ae0747 100644 --- a/roles/hive/metastore/tasks/status.yml +++ b/roles/hive/metastore/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hive-metastore is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hive-metastore.service'].state == "running" quiet: true diff --git a/roles/hive/metastore/tasks/stop.yml b/roles/hive/metastore/tasks/stop.yml index db7c54ae..c90467e0 100644 --- a/roles/hive/metastore/tasks/stop.yml +++ b/roles/hive/metastore/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Hive Metastore - service: + ansible.builtin.service: name: hive-metastore state: stopped enabled: "{{ hivemetastore_start_on_boot }}" diff --git a/roles/hive/ranger/tasks/config.yml b/roles/hive/ranger/tasks/config.yml index 46536389..11804a27 100644 --- a/roles/hive/ranger/tasks/config.yml +++ b/roles/hive/ranger/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: install.properties.j2 dest: "{{ ranger_hive_install_dir }}/install.properties" owner: root @@ -15,26 +15,26 @@ # TODO: find a better way to do this - name: Backup {{ hive_install_dir }}/conf - command: mv {{ hive_install_dir }}/conf {{ hive_install_dir }}/conf.bk + ansible.builtin.command: mv {{ hive_install_dir }}/conf {{ hive_install_dir }}/conf.bk args: creates: "{{ hive_install_dir }}/conf.bk" - name: Create symbolic link from conf in {{ hive_install_dir }} to actual Hive Server2 config dir - file: + ansible.builtin.file: src: "{{ hive_s2_conf_dir }}" dest: "{{ hive_install_dir }}/conf" state: link # We also need to fix the path of the ranger-policymgr-ssl.xml containing the trustore properties in ranger-hive-security.xml - name: Fix the path of ranger-policymgr-ssl.xml in ranger-hive-security-changes.cfg - lineinfile: + ansible.builtin.lineinfile: path: "{{ ranger_hive_install_dir }}/install/conf.templates/enable/ranger-hive-security-changes.cfg" regexp: '^ranger.plugin.hive.policy.rest.ssl.config.file\s+([^ ]+) (.*)$' line: 'ranger.plugin.hive.policy.rest.ssl.config.file {{ hive_s2_conf_dir }}/ranger-policymgr-ssl.xml \2' backrefs: true - name: Run enable-hive-plugin.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./enable-hive-plugin.sh args: diff --git a/roles/hive/ranger/tasks/init.yml b/roles/hive/ranger/tasks/init.yml index 9972353e..00d8aebb 100644 --- a/roles/hive/ranger/tasks/init.yml +++ b/roles/hive/ranger/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create Hive service run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_hive_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: diff --git a/roles/hive/ranger/tasks/install.yml b/roles/hive/ranger/tasks/install.yml index 46958bfe..44d4ac16 100644 --- a/roles/hive/ranger/tasks/install.yml +++ b/roles/hive/ranger/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ ranger_hive_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_hive_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ ranger_hive_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_hive_dist_file }}" dest: "{{ hive_root_dir }}" owner: root @@ -22,7 +22,7 @@ creates: "{{ hive_root_dir }}/{{ ranger_hive_release }}" - name: Ensure right permissions on ranger libs - file: + ansible.builtin.file: path: "{{ hive_root_dir }}/{{ ranger_hive_release }}" owner: root group: root @@ -31,7 +31,7 @@ state: directory - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ hive_root_dir }}/{{ ranger_hive_release }}" dest: "{{ ranger_hive_install_dir }}" state: link diff --git a/roles/knox/common/tasks/install.yml b/roles/knox/common/tasks/install.yml index cb1ea1fc..12b8165f 100644 --- a/roles/knox/common/tasks/install.yml +++ b/roles/knox/common/tasks/install.yml @@ -3,20 +3,20 @@ --- - name: Ensure knox group exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.group vars: group: "{{ knox_group }}" - name: Ensure knox user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ knox_user }}" group: "{{ knox_group }}" - name: Upload Knox binaries - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -28,7 +28,7 @@ diff: false - name: Ensure {{ knox_root_dir }} exists - file: + ansible.builtin.file: path: "{{ knox_root_dir }}" state: directory owner: root @@ -36,7 +36,7 @@ mode: "755" - name: Extract knox binaries - unarchive: + ansible.builtin.unarchive: src: "{{ item.src }}" dest: "{{ knox_root_dir }}" owner: "{{ knox_user }}" @@ -51,7 +51,7 @@ creates: "{{ knox_root_dir }}/{{ knoxshell_release }}" - name: Ensure knox permissions - file: + ansible.builtin.file: path: "{{ item }}" state: directory owner: root @@ -63,7 +63,7 @@ - "{{ knox_root_dir }}/{{ knoxshell_release }}" - name: Create symbolic link to Hadoop installation - file: + ansible.builtin.file: src: "{{ item.src }}" dest: "{{ item.dest }}" state: link @@ -74,7 +74,7 @@ dest: "{{ knoxshell_install_dir }}" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ knox_pid_dir }}" state: directory owner: "{{ knox_user }}" @@ -82,7 +82,7 @@ mode: "750" - name: Template knox tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-knox.conf.j2 dest: /etc/tmpfiles.d/knox.conf owner: root @@ -90,7 +90,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ knox_log_dir }}" state: directory owner: "{{ knox_user }}" @@ -98,7 +98,7 @@ mode: "750" - name: Create Keystore directory - file: + ansible.builtin.file: path: "{{ knox_keystore_dir }}" state: directory owner: "{{ knox_user }}" diff --git a/roles/knox/gateway/tasks/config.yml b/roles/knox/gateway/tasks/config.yml index e84c0ed3..0214af2f 100644 --- a/roles/knox/gateway/tasks/config.yml +++ b/roles/knox/gateway/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ knox_conf_dir }}/" dest: "{{ knox_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Copy services definition to data directory - copy: + ansible.builtin.copy: src: "{{ knox_install_dir }}/data/services" dest: "{{ knox_data_dir }}/data/" owner: "{{ knox_user }}" @@ -23,7 +23,7 @@ remote_src: true - name: Copy applications definition to data directory - copy: + ansible.builtin.copy: src: "{{ knox_install_dir }}/data/applications" dest: "{{ knox_data_dir }}/data/" owner: "{{ knox_user }}" @@ -33,7 +33,7 @@ # Spark Historyserver service definition - name: Create Spark Historyserver service dir - file: + ansible.builtin.file: path: "{{ knox_data_dir }}/data/services/sparkhistoryui/2.3.0" state: directory owner: "{{ knox_user }}" @@ -41,7 +41,7 @@ mode: "755" - name: Template Spark Historyserver service.xml - template: + ansible.builtin.template: src: services/sparkhistoryui/2.3.0/service.xml.j2 dest: "{{ knox_data_dir }}/data/services/sparkhistoryui/2.3.0/service.xml" owner: "{{ knox_user }}" @@ -49,7 +49,7 @@ mode: "644" - name: Template Spark Historyserver rewrite.xml - template: + ansible.builtin.template: src: services/sparkhistoryui/2.3.0/rewrite.xml.j2 dest: "{{ knox_data_dir }}/data/services/sparkhistoryui/2.3.0/rewrite.xml" owner: "{{ knox_user }}" @@ -57,7 +57,7 @@ mode: "644" - name: Template Spark3 Historyserver rewrite.xml - template: + ansible.builtin.template: src: services/spark3historyui/3.0.0/rewrite.xml.j2 dest: "{{ knox_data_dir }}/data/services/spark3historyui/3.0.0/rewrite.xml" owner: "{{ knox_user }}" @@ -65,7 +65,7 @@ mode: "644" - name: Template Yarn UI rewrite.xml - template: + ansible.builtin.template: src: services/yarnui/2.7.0/rewrite.xml.j2 dest: "{{ knox_data_dir }}/data/services/yarnui/2.7.0/rewrite.xml" owner: "{{ knox_user }}" @@ -73,7 +73,7 @@ mode: "644" - name: Template Knox gateway-site.xml - template: + ansible.builtin.template: src: gateway-site.xml.j2 dest: "{{ knox_conf_dir }}/gateway-site.xml" owner: root @@ -81,7 +81,7 @@ mode: "644" - name: Template Knox Gateway main start script "gateway.sh" - template: + ansible.builtin.template: src: gateway.sh.j2 dest: "{{ knox_install_dir }}/bin/gateway.sh" owner: root @@ -89,7 +89,7 @@ mode: "755" - name: Template KnoxCLI script - template: + ansible.builtin.template: src: knoxcli.sh.j2 dest: "{{ knox_install_dir }}/bin/knoxcli.sh" owner: root @@ -97,7 +97,7 @@ mode: "755" - name: Template Knox Gateway environment script "knox-env.sh" - template: + ansible.builtin.template: src: knox-env.sh.j2 dest: "{{ knox_install_dir }}/bin/knox-env.sh" owner: root @@ -105,7 +105,7 @@ mode: "644" - name: Template Knox Gateway log4j.properties file - template: + ansible.builtin.template: src: gateway-log4j.properties.j2 dest: "{{ knox_conf_dir }}/gateway-log4j.properties" owner: root @@ -113,7 +113,7 @@ mode: "644" - name: Template Knox Gateway Cli log4j.properties file - template: + ansible.builtin.template: src: knoxcli-log4j.properties.j2 dest: "{{ knox_conf_dir }}/knoxcli-log4j.properties" owner: root @@ -121,7 +121,7 @@ mode: "644" - name: Template Knox Gateway Ldap log4j.properties file - template: + ansible.builtin.template: src: ldap-log4j.properties.j2 dest: "{{ knox_conf_dir }}/ldap-log4j.properties" owner: root @@ -129,7 +129,7 @@ mode: "644" - name: Template Knox Gateway Shell log4j.properties file - template: + ansible.builtin.template: src: shell-log4j.properties.j2 dest: "{{ knox_conf_dir }}/shell-log4j.properties" owner: root @@ -137,7 +137,7 @@ mode: "644" - name: Template Knox topologies - template: + ansible.builtin.template: src: topology.xml.j2 dest: "{{ knox_conf_dir }}/topologies/{{ item.key }}.xml" owner: root @@ -149,7 +149,7 @@ - name: Generate Knox master secret become_user: knox - shell: | + ansible.builtin.shell: | set timeout 10 spawn {{ knox_install_dir }}/bin/knoxcli.sh create-master --force @@ -168,7 +168,7 @@ - name: Save secrets in Knox store become_user: knox - command: | + ansible.builtin.command: | {{ knox_install_dir }}/bin/knoxcli.sh \ create-alias {{ item.key }} \ --value '{{ item.value }}' \ @@ -178,7 +178,7 @@ no_log: true - name: Ensure truststore is valid - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: @@ -187,7 +187,7 @@ alias: "gateway-identity" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ knox_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/knox/gateway/tasks/install.yml b/roles/knox/gateway/tasks/install.yml index 85a876f7..01810ce1 100644 --- a/roles/knox/gateway/tasks/install.yml +++ b/roles/knox/gateway/tasks/install.yml @@ -3,17 +3,17 @@ --- - name: Ensure knox common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.knox.common tasks_from: install # Needed to run expect inside config.yml - name: Install expect - package: + ansible.builtin.package: name: expect - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ knox_conf_dir }}" state: directory owner: root @@ -21,7 +21,7 @@ mode: "755" - name: Create configuration subdirectories - file: + ansible.builtin.file: path: "{{ knox_conf_dir }}/{{ item }}" state: directory owner: "{{ knox_user }}" @@ -33,7 +33,7 @@ - topologies - name: Create data directories - file: + ansible.builtin.file: path: "{{ item }}" state: directory owner: "{{ knox_user }}" @@ -46,7 +46,7 @@ #- "{{ gateway_site['gateway.services.dir'] }}" - name: Template Knox Gateway service file - template: + ansible.builtin.template: src: knox-gateway.service.j2 dest: /usr/lib/systemd/system/knox-gateway.service owner: root diff --git a/roles/knox/gateway/tasks/jmx-exporter.yml b/roles/knox/gateway/tasks/jmx-exporter.yml index 36560bd3..2dc56b31 100644 --- a/roles/knox/gateway/tasks/jmx-exporter.yml +++ b/roles/knox/gateway/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/kn.yml" owner: root diff --git a/roles/knox/gateway/tasks/kerberos.yml b/roles/knox/gateway/tasks/kerberos.yml index 11f20eaf..a6db89e4 100644 --- a/roles/knox/gateway/tasks/kerberos.yml +++ b/roles/knox/gateway/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure knox user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure Knox spnego keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -32,7 +32,7 @@ when: not krb_create_principals_keytabs - name: Template Knox Gateway JAAS file - template: + ansible.builtin.template: src: krb5JAASLogin.conf.j2 dest: "{{ knox_conf_dir }}/krb5JAASLogin.conf" owner: root @@ -40,7 +40,7 @@ mode: "644" - name: Create symbolic link to krb5.conf - file: + ansible.builtin.file: src: /etc/krb5.conf dest: "{{ knox_conf_dir }}/krb5.conf" state: link diff --git a/roles/knox/gateway/tasks/restart.yml b/roles/knox/gateway/tasks/restart.yml index 46c43236..8248a704 100644 --- a/roles/knox/gateway/tasks/restart.yml +++ b/roles/knox/gateway/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Knox Gateway - service: + ansible.builtin.service: name: knox-gateway state: restarted enabled: "{{ knox_start_on_boot }}" diff --git a/roles/knox/gateway/tasks/ssl-tls.yml b/roles/knox/gateway/tasks/ssl-tls.yml index 2bfad577..e7112308 100644 --- a/roles/knox/gateway/tasks/ssl-tls.yml +++ b/roles/knox/gateway/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure knox keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -12,7 +12,7 @@ user: "{{ knox_user }}" - name: Ensure knox truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/knox/gateway/tasks/start.yml b/roles/knox/gateway/tasks/start.yml index fbe6acc2..566641d6 100644 --- a/roles/knox/gateway/tasks/start.yml +++ b/roles/knox/gateway/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Knox Gateway - service: + ansible.builtin.service: name: knox-gateway state: started enabled: "{{ knox_start_on_boot }}" diff --git a/roles/knox/gateway/tasks/status.yml b/roles/knox/gateway/tasks/status.yml index ac8633c5..75531e63 100644 --- a/roles/knox/gateway/tasks/status.yml +++ b/roles/knox/gateway/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert knox-gateway is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['knox-gateway.service'].state == "running" quiet: true diff --git a/roles/knox/gateway/tasks/stop.yml b/roles/knox/gateway/tasks/stop.yml index 2fcd56f1..ce2a384b 100644 --- a/roles/knox/gateway/tasks/stop.yml +++ b/roles/knox/gateway/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Knox Gateway - service: + ansible.builtin.service: name: knox-gateway state: stopped enabled: "{{ knox_start_on_boot }}" diff --git a/roles/knox/ranger/tasks/config.yml b/roles/knox/ranger/tasks/config.yml index 445c01e1..7a034a87 100644 --- a/roles/knox/ranger/tasks/config.yml +++ b/roles/knox/ranger/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: install.properties.j2 dest: "{{ ranger_knox_install_dir }}/install.properties" owner: root @@ -16,26 +16,26 @@ # TODO: find a better way to do this - name: Backup {{ knox_install_dir }}/conf - command: mv {{ knox_install_dir }}/conf {{ knox_install_dir }}/conf.bk + ansible.builtin.command: mv {{ knox_install_dir }}/conf {{ knox_install_dir }}/conf.bk args: creates: "{{ knox_install_dir }}/conf.bk" - name: Create symbolic link from conf in {{ knox_install_dir }} to actual Knox config dir - file: + ansible.builtin.file: src: "{{ knox_conf_dir }}" dest: "{{ knox_install_dir }}/conf" state: link # We also need to fix the path of the ranger-policymgr-ssl.xml containing the trustore properties in ranger-knox-security.xml - name: Fix the path of ranger-policymgr-ssl.xml in ranger-knox-security-changes.cfg - lineinfile: + ansible.builtin.lineinfile: path: "{{ ranger_knox_install_dir }}/install/conf.templates/enable/ranger-knox-security-changes.cfg" regexp: '^ranger.plugin.knox.policy.rest.ssl.config.file\s+([^ ]+) (.*)$' line: 'ranger.plugin.knox.policy.rest.ssl.config.file /etc/knox/conf/ranger-policymgr-ssl.xml \2' backrefs: true - name: Run enable-knox-plugin.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./enable-knox-plugin.sh args: diff --git a/roles/knox/ranger/tasks/init.yml b/roles/knox/ranger/tasks/init.yml index 4a819db1..9e13794e 100644 --- a/roles/knox/ranger/tasks/init.yml +++ b/roles/knox/ranger/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create knox service run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_knox_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: @@ -34,7 +34,7 @@ 'Duplicate service name' not in reg_knox.json.msgDesc) - name: Link hdfs-site and core-site in knox conf dir - file: + ansible.builtin.file: src: "{{ hadoop_conf_dir }}/{{ item }}" dest: "{{ knox_conf_dir }}/{{ item }}" state: link @@ -44,5 +44,5 @@ #TODO Fix it in the build instead - name: Quickfix of missing jars for ranger plugin - shell: "ln -s {{ hadoop_root_dir }}/hadoop/share/hadoop/hdfs/hadoop-hdfs-* {{ ranger_knox_install_dir }}/lib/ranger-knox-plugin-impl/" + ansible.builtin.shell: "ln -s {{ hadoop_root_dir }}/hadoop/share/hadoop/hdfs/hadoop-hdfs-* {{ ranger_knox_install_dir }}/lib/ranger-knox-plugin-impl/" ignore_errors: true diff --git a/roles/knox/ranger/tasks/install.yml b/roles/knox/ranger/tasks/install.yml index 82bdf3a3..27b17307 100644 --- a/roles/knox/ranger/tasks/install.yml +++ b/roles/knox/ranger/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ ranger_knox_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_knox_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ ranger_knox_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_knox_dist_file }}" dest: "{{ knox_root_dir }}" owner: root @@ -22,7 +22,7 @@ creates: "{{ knox_root_dir }}/{{ ranger_knox_release }}" - name: Ensure right permissions on ranger libs - file: + ansible.builtin.file: path: "{{ knox_root_dir }}/{{ ranger_knox_release }}" owner: root group: root @@ -31,7 +31,7 @@ state: directory - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ knox_root_dir }}/{{ ranger_knox_release }}" dest: "{{ ranger_knox_install_dir }}" state: link diff --git a/roles/ranger/admin/tasks/config.yml b/roles/ranger/admin/tasks/config.yml index 19e9c26b..5d57792e 100644 --- a/roles/ranger/admin/tasks/config.yml +++ b/roles/ranger/admin/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: install.properties.j2 dest: "{{ ranger_install_dir }}/install.properties" owner: "{{ ranger_user }}" @@ -11,7 +11,7 @@ mode: "644" - name: Run setup.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./setup.sh args: @@ -21,7 +21,7 @@ # ! setup.sh will run db_setup.py that copies the connecter library # ! on systems with restrictivev umask, this jar will have bad permissions - name: Ensure right permissions on sql connector library - file: + ansible.builtin.file: path: "{{ ranger_root_dir }}/{{ ranger_release }}/ews/webapp/WEB-INF/lib/" owner: "{{ ranger_user }}" group: "{{ hadoop_group }}" @@ -30,14 +30,14 @@ recurse: true - name: Ensure right permissions on {{ ranger_install_dir }}/conf/.jceks folder - file: + ansible.builtin.file: path: "{{ ranger_install_dir }}/conf/.jceks" owner: "{{ ranger_user }}" group: "{{ hadoop_group }}" mode: "750" - name: Create symbolic link to configuration directory - file: + ansible.builtin.file: src: "{{ ranger_install_dir }}/conf" dest: "{{ ranger_adm_conf_dir }}" state: link @@ -45,7 +45,7 @@ owner: "{{ ranger_user }}" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ ranger_adm_conf_dir }}/jmxremote.password" owner: "{{ ranger_user }}" @@ -53,7 +53,7 @@ mode: "644" - name: Render ranger-admin-services.sh - template: + ansible.builtin.template: src: ranger-admin-services.sh.j2 dest: "{{ ranger_install_dir }}/ews/ranger-admin-services.sh" owner: "{{ ranger_user }}" @@ -61,7 +61,7 @@ mode: "755" - name: Ensure ranger-admin-site.xml is configured - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.xml tasks_from: merge vars: @@ -69,7 +69,7 @@ merge_var: "{{ ranger_admin_site }}" - name: Render log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ ranger_install_dir }}/conf/log4j.properties" owner: "{{ ranger_user }}" diff --git a/roles/ranger/admin/tasks/hdfs.yml b/roles/ranger/admin/tasks/hdfs.yml index cb5e6ca3..e6bfddc4 100644 --- a/roles/ranger/admin/tasks/hdfs.yml +++ b/roles/ranger/admin/tasks/hdfs.yml @@ -4,7 +4,7 @@ --- # Needed for HDFS path lookup in policy creation - name: Create symbolic link to hdfs-site.xml - file: + ansible.builtin.file: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ ranger_adm_conf_dir }}/hdfs-site.xml" state: link diff --git a/roles/ranger/admin/tasks/install.yml b/roles/ranger/admin/tasks/install.yml index 99e32eb5..e3b99d25 100644 --- a/roles/ranger/admin/tasks/install.yml +++ b/roles/ranger/admin/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common ranger installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.common tasks_from: install - name: Upload {{ ranger_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -17,7 +17,7 @@ diff: false - name: Extract {{ ranger_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_dist_file }}" dest: "{{ ranger_root_dir }}" owner: "{{ ranger_user }}" @@ -27,13 +27,13 @@ creates: "{{ ranger_root_dir }}/{{ ranger_release }}" - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ ranger_root_dir }}/{{ ranger_release }}" dest: "{{ ranger_install_dir }}" state: link - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ ranger_pid_dir }}" state: directory owner: "{{ ranger_user }}" @@ -41,7 +41,7 @@ mode: "755" - name: Template ranger tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-ranger.conf.j2 dest: /etc/tmpfiles.d/ranger.conf owner: root @@ -49,7 +49,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ ranger_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -57,12 +57,12 @@ mode: "770" - name: Install jdbc connector - package: + ansible.builtin.package: name: "{{ ranger_jdbc_connector_package }}" state: present - name: Template Ranger Admin service file - template: + ansible.builtin.template: src: ranger-admin.service.j2 dest: /usr/lib/systemd/system/ranger-admin.service owner: root diff --git a/roles/ranger/admin/tasks/jmx-exporter.yml b/roles/ranger/admin/tasks/jmx-exporter.yml index 8f1cfef6..6525343b 100644 --- a/roles/ranger/admin/tasks/jmx-exporter.yml +++ b/roles/ranger/admin/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/ra.yml" owner: root diff --git a/roles/ranger/admin/tasks/kerberos.yml b/roles/ranger/admin/tasks/kerberos.yml index 9c3d516c..baeb23ed 100644 --- a/roles/ranger/admin/tasks/kerberos.yml +++ b/roles/ranger/admin/tasks/kerberos.yml @@ -3,14 +3,14 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ranger Admin keytabs creation block: - name: Ensure rangerlookup user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -21,7 +21,7 @@ mode: "0600" - name: Ensure rangeradmin user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -32,7 +32,7 @@ mode: "0600" - name: Ensure HTTP spnego user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -43,7 +43,7 @@ mode: "0640" - name: Ensure HTTP HA spnego user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -58,7 +58,7 @@ - name: Ranger Admin keytabs check block: - name: Ensure rangerlookup's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -69,7 +69,7 @@ mode: "0600" - name: Ensure rangeradmin's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -80,7 +80,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -92,7 +92,7 @@ when: not krb_create_principals_keytabs - name: Ensure HA HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/ranger/admin/tasks/restart.yml b/roles/ranger/admin/tasks/restart.yml index eb7e19a8..1d4ce33b 100644 --- a/roles/ranger/admin/tasks/restart.yml +++ b/roles/ranger/admin/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Ranger Admin - service: + ansible.builtin.service: name: ranger-admin state: restarted enabled: "{{ ranger_admin_start_on_boot }}" diff --git a/roles/ranger/admin/tasks/ssl-tls.yml b/roles/ranger/admin/tasks/ssl-tls.yml index c3fe9bb0..b9cf73eb 100644 --- a/roles/ranger/admin/tasks/ssl-tls.yml +++ b/roles/ranger/admin/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure ranger keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -11,7 +11,7 @@ keystore_password: "{{ ranger_keystore_password }}" - name: Ensure ranger truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: @@ -19,7 +19,7 @@ truststore_password: "{{ ranger_truststore_password }}" - name: Ensure truststore is correctly configured - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: diff --git a/roles/ranger/admin/tasks/start.yml b/roles/ranger/admin/tasks/start.yml index 729ae431..c8afdd0d 100644 --- a/roles/ranger/admin/tasks/start.yml +++ b/roles/ranger/admin/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Ranger Admin - service: + ansible.builtin.service: name: ranger-admin state: started enabled: "{{ ranger_admin_start_on_boot }}" diff --git a/roles/ranger/admin/tasks/status.yml b/roles/ranger/admin/tasks/status.yml index d1edb812..87805ebb 100644 --- a/roles/ranger/admin/tasks/status.yml +++ b/roles/ranger/admin/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert ranger-admin is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['ranger-admin.service'].state == "running" quiet: true diff --git a/roles/ranger/admin/tasks/stop.yml b/roles/ranger/admin/tasks/stop.yml index 10a46d9f..a07b174a 100644 --- a/roles/ranger/admin/tasks/stop.yml +++ b/roles/ranger/admin/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Ranger Admin - service: + ansible.builtin.service: name: ranger-admin state: stopped enabled: "{{ ranger_admin_start_on_boot }}" diff --git a/roles/ranger/common/tasks/install.yml b/roles/ranger/common/tasks/install.yml index 2c9871ea..d36e8bdf 100644 --- a/roles/ranger/common/tasks/install.yml +++ b/roles/ranger/common/tasks/install.yml @@ -3,20 +3,20 @@ --- - name: Ensure hadoop group exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.group vars: group: "{{ hadoop_group }}" - name: Ensure ranger user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ ranger_user }}" group: "{{ hadoop_group }}" - name: Ensure {{ ranger_root_dir }} exists - file: + ansible.builtin.file: path: "{{ ranger_root_dir }}" state: directory owner: root @@ -24,7 +24,7 @@ mode: "755" - name: Create ranger config directory - file: + ansible.builtin.file: path: "{{ ranger_conf_dir }}" state: directory owner: "{{ ranger_user }}" diff --git a/roles/ranger/kms/tasks/config.yml b/roles/ranger/kms/tasks/config.yml index 6a2e6e1d..21e40ec1 100644 --- a/roles/ranger/kms/tasks/config.yml +++ b/roles/ranger/kms/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: kms_install.properties.j2 dest: "{{ ranger_kms_install_dir }}/install.properties" owner: "{{ ranger_kms_user }}" @@ -11,7 +11,7 @@ mode: "644" - name: Run setup.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./setup.sh args: @@ -19,7 +19,7 @@ throttle: 1 - name: Create symbolic link to configuration directory - file: + ansible.builtin.file: src: "{{ ranger_kms_install_dir }}/ews/webapp/WEB-INF/classes/conf" dest: "{{ ranger_kms_conf_dir }}/conf" state: link @@ -27,14 +27,14 @@ owner: "{{ ranger_kms_user }}" - name: Ensure right permissions on {{ ranger_kms_install_dir }}/conf/.jceks folder - file: + ansible.builtin.file: path: "{{ ranger_kms_conf_dir }}/conf/.jceks" owner: "{{ ranger_kms_user }}" group: "{{ hadoop_group }}" mode: "750" - name: Template kms-site.xml - template: + ansible.builtin.template: src: kms-site.xml.j2 dest: "{{ ranger_kms_conf_dir }}/conf/kms-site.xml" owner: "{{ ranger_kms_user }}" @@ -42,7 +42,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ ranger_kms_conf_dir }}/conf/jmxremote.password" owner: "{{ ranger_kms_user }}" @@ -50,7 +50,7 @@ mode: "644" - name: Render ranger-kms command - template: + ansible.builtin.template: src: ranger-kms.j2 dest: "{{ ranger_kms_install_dir }}/ranger-kms" owner: "{{ ranger_kms_user }}" @@ -58,7 +58,7 @@ mode: "755" - name: Render log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ ranger_kms_conf_dir }}/conf/log4j.properties" owner: "{{ ranger_kms_user }}" @@ -66,7 +66,7 @@ mode: "755" - name: Copy core-site.xml - copy: + ansible.builtin.copy: src: "{{ hadoop_client_conf_dir }}/core-site.xml" dest: "{{ ranger_kms_conf_dir }}/conf/core-site.xml" remote_src: true @@ -75,7 +75,7 @@ mode: "644" - name: Ensure ranger-kms-site.xml is configured - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.xml tasks_from: merge vars: diff --git a/roles/ranger/kms/tasks/init.yml b/roles/ranger/kms/tasks/init.yml index c722aee8..16c2042d 100644 --- a/roles/ranger/kms/tasks/init.yml +++ b/roles/ranger/kms/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create kms service run_once: true - uri: + ansible.builtin.uri: url: "{{ kms_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: diff --git a/roles/ranger/kms/tasks/install.yml b/roles/ranger/kms/tasks/install.yml index c3d7d1f9..71b44618 100644 --- a/roles/ranger/kms/tasks/install.yml +++ b/roles/ranger/kms/tasks/install.yml @@ -3,19 +3,19 @@ --- - name: Ensure common ranger installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.common tasks_from: install - name: Ensure ranger kms user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ ranger_kms_user }}" group: "{{ hadoop_group }}" - name: Upload {{ ranger_kms_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_kms_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -24,7 +24,7 @@ diff: false - name: Extract {{ ranger_kms_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_kms_dist_file }}" dest: "{{ ranger_root_dir }}" owner: "{{ ranger_kms_user }}" @@ -34,7 +34,7 @@ creates: "{{ ranger_root_dir }}/{{ ranger_kms_release }}" - name: Ensure right permissions on {{ ranger_root_dir }}/{{ ranger_kms_release }} - file: + ansible.builtin.file: path: "{{ ranger_root_dir }}/{{ ranger_kms_release }}" owner: "{{ ranger_kms_user }}" group: "{{ hadoop_group }}" @@ -42,13 +42,13 @@ state: directory - name: Create symbolic link to Ranger KMS installation - file: + ansible.builtin.file: src: "{{ ranger_root_dir }}/{{ ranger_kms_release }}" dest: "{{ ranger_kms_install_dir }}" state: link - name: Create Ranger KMS config directory - file: + ansible.builtin.file: path: "{{ ranger_kms_conf_dir }}" state: directory owner: root @@ -56,7 +56,7 @@ mode: "755" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ ranger_kms_pid_dir }}" state: directory owner: "{{ ranger_kms_user }}" @@ -64,7 +64,7 @@ mode: "755" - name: Template Ranger KMS tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-ranger-kms.conf.j2 dest: /etc/tmpfiles.d/ranger-kms.conf owner: root @@ -72,7 +72,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ ranger_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -80,12 +80,12 @@ mode: "770" - name: Install jdbc connector - package: + ansible.builtin.package: name: "{{ ranger_jdbc_connector_package }}" state: present - name: Template Ranger KMS service file - template: + ansible.builtin.template: src: ranger-kms.service.j2 dest: /usr/lib/systemd/system/ranger-kms.service owner: root diff --git a/roles/ranger/kms/tasks/jmx-exporter.yml b/roles/ranger/kms/tasks/jmx-exporter.yml index 8f1cfef6..6525343b 100644 --- a/roles/ranger/kms/tasks/jmx-exporter.yml +++ b/roles/ranger/kms/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/ra.yml" owner: root diff --git a/roles/ranger/kms/tasks/kerberos.yml b/roles/ranger/kms/tasks/kerberos.yml index 1dcd0d09..84941410 100644 --- a/roles/ranger/kms/tasks/kerberos.yml +++ b/roles/ranger/kms/tasks/kerberos.yml @@ -3,14 +3,14 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ranger KMS keytabs creation block: - name: Ensure keyadmin user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -21,7 +21,7 @@ mode: "0600" - name: Ensure HTTP spnego user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -35,7 +35,7 @@ - name: Ranger KMS keytabs check block: - name: Ensure keyadmin's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -46,7 +46,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/ranger/kms/tasks/restart.yml b/roles/ranger/kms/tasks/restart.yml index 166d0859..6b488223 100644 --- a/roles/ranger/kms/tasks/restart.yml +++ b/roles/ranger/kms/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Ranger KMS - service: + ansible.builtin.service: name: ranger-kms state: restarted enabled: "{{ ranger_kms_start_on_boot }}" diff --git a/roles/ranger/kms/tasks/ssl-tls.yml b/roles/ranger/kms/tasks/ssl-tls.yml index c3fe9bb0..b9cf73eb 100644 --- a/roles/ranger/kms/tasks/ssl-tls.yml +++ b/roles/ranger/kms/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure ranger keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -11,7 +11,7 @@ keystore_password: "{{ ranger_keystore_password }}" - name: Ensure ranger truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: @@ -19,7 +19,7 @@ truststore_password: "{{ ranger_truststore_password }}" - name: Ensure truststore is correctly configured - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: diff --git a/roles/ranger/kms/tasks/start.yml b/roles/ranger/kms/tasks/start.yml index de2ec48d..0bf389c9 100644 --- a/roles/ranger/kms/tasks/start.yml +++ b/roles/ranger/kms/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Ranger KMS - service: + ansible.builtin.service: name: ranger-kms state: started enabled: "{{ ranger_kms_start_on_boot }}" diff --git a/roles/ranger/kms/tasks/status.yml b/roles/ranger/kms/tasks/status.yml index 9a87ed47..95c53ad0 100644 --- a/roles/ranger/kms/tasks/status.yml +++ b/roles/ranger/kms/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert ranger-kms is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['ranger-kms.service'].state == "running" quiet: true diff --git a/roles/ranger/kms/tasks/stop.yml b/roles/ranger/kms/tasks/stop.yml index c31b7e19..e5e006c9 100644 --- a/roles/ranger/kms/tasks/stop.yml +++ b/roles/ranger/kms/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Ranger KMS - service: + ansible.builtin.service: name: ranger-kms state: stopped enabled: "{{ ranger_kms_start_on_boot }}" diff --git a/roles/ranger/solr/tasks/init.yml b/roles/ranger/solr/tasks/init.yml index 7e08dff6..18f9a502 100644 --- a/roles/ranger/solr/tasks/init.yml +++ b/roles/ranger/solr/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create ranger_audits core become_user: "{{ solr_user }}" - shell: | + ansible.builtin.shell: | {{ solr_install_dir }}/bin/solr create_core -c ranger_audits -d {{ solr_bootstrap_config_dir }} args: creates: "{{ solr_install_dir }}/server/solr/ranger_audits" diff --git a/roles/ranger/solr/tasks/install.yml b/roles/ranger/solr/tasks/install.yml index 26d600bd..d8251691 100644 --- a/roles/ranger/solr/tasks/install.yml +++ b/roles/ranger/solr/tasks/install.yml @@ -3,20 +3,20 @@ --- - name: Ensure hadoop group exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.group vars: group: "{{ hadoop_group }}" - name: Ensure solr user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ solr_user }}" group: "{{ hadoop_group }}" - name: Ensure {{ solr_root_dir }} exists - file: + ansible.builtin.file: path: "{{ solr_root_dir }}" state: directory owner: root @@ -24,7 +24,7 @@ mode: "755" - name: Create solr config directory - file: + ansible.builtin.file: path: "{{ solr_conf_dir }}" state: directory owner: root @@ -32,7 +32,7 @@ mode: "755" - name: Upload {{ solr_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ solr_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -41,7 +41,7 @@ diff: false - name: Extract {{ solr_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ solr_dist_file }}" dest: "{{ solr_root_dir }}" owner: root @@ -51,7 +51,7 @@ creates: "{{ solr_root_dir }}/{{ solr_release }}" - name: Ensure right permissions on solr folders - file: + ansible.builtin.file: path: "{{ item }}" owner: root group: root @@ -65,7 +65,7 @@ # TODO: We should rework the solr service to have configurations in /etc and not here - name: Ensure right permissions on {{ ranger_solr_datadir }} - file: + ansible.builtin.file: path: "{{ ranger_solr_datadir }}" owner: "{{ solr_user }}" group: "{{ hadoop_group }}" @@ -73,13 +73,13 @@ state: directory - name: Create symbolic link to Solr installation - file: + ansible.builtin.file: src: "{{ solr_root_dir }}/{{ solr_release }}" dest: "{{ solr_install_dir }}" state: link - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ solr_pid_dir }}" state: directory owner: "{{ solr_user }}" @@ -87,7 +87,7 @@ mode: "755" - name: Template solr tmpfiles.d - template: + ansible.builtin.template: src: solr_standalone/tmpfiles-solr.conf.j2 dest: /etc/tmpfiles.d/solr.conf owner: root @@ -95,7 +95,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ ranger_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -103,7 +103,7 @@ mode: "770" - name: Create collection config bootstrap directory - file: + ansible.builtin.file: path: "{{ solr_bootstrap_config_dir }}" state: directory owner: root @@ -111,7 +111,7 @@ mode: "755" - name: Upload solr bootstrap configuration files - copy: + ansible.builtin.copy: src: "{{ item }}" dest: "{{ solr_bootstrap_config_dir }}" owner: root @@ -122,7 +122,7 @@ - elevate.xml - name: Template solrconfig.xml file - template: + ansible.builtin.template: src: solr_standalone/ranger_audits/solrconfig.xml.j2 dest: "{{ solr_bootstrap_config_dir }}/solrconfig.xml" owner: root @@ -130,7 +130,7 @@ mode: "644" - name: Template log4j2.properties file - template: + ansible.builtin.template: src: solr_standalone/log4j2.properties.j2 dest: "{{ solr_conf_dir }}/log4j2.properties" owner: root @@ -138,7 +138,7 @@ mode: "644" - name: Template Solr service file - template: + ansible.builtin.template: src: solr_standalone/solr.service.j2 dest: /usr/lib/systemd/system/solr.service owner: root diff --git a/roles/ranger/solr/tasks/restart.yml b/roles/ranger/solr/tasks/restart.yml index 3e776872..d3b5d631 100644 --- a/roles/ranger/solr/tasks/restart.yml +++ b/roles/ranger/solr/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Solr - service: + ansible.builtin.service: name: solr state: restarted enabled: "{{ ranger_solr_start_on_boot }}" diff --git a/roles/ranger/solr/tasks/start.yml b/roles/ranger/solr/tasks/start.yml index 6c2355f5..fa700f2e 100644 --- a/roles/ranger/solr/tasks/start.yml +++ b/roles/ranger/solr/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Solr - service: + ansible.builtin.service: name: solr state: started enabled: "{{ ranger_solr_start_on_boot }}" diff --git a/roles/ranger/solr/tasks/status.yml b/roles/ranger/solr/tasks/status.yml index 702305aa..892426c1 100644 --- a/roles/ranger/solr/tasks/status.yml +++ b/roles/ranger/solr/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert solr is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['solr.service'].state == "running" quiet: true diff --git a/roles/ranger/solr/tasks/stop.yml b/roles/ranger/solr/tasks/stop.yml index 0053ad3c..4cd40be2 100644 --- a/roles/ranger/solr/tasks/stop.yml +++ b/roles/ranger/solr/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Solr - service: + ansible.builtin.service: name: solr state: stopped enabled: "{{ ranger_solr_start_on_boot }}" diff --git a/roles/ranger/usersync/tasks/config.yml b/roles/ranger/usersync/tasks/config.yml index 338559cd..8f0ef76a 100644 --- a/roles/ranger/usersync/tasks/config.yml +++ b/roles/ranger/usersync/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: usersync_install.properties.j2 dest: "{{ ranger_usersync_install_dir }}/install.properties" owner: "{{ ranger_user }}" @@ -11,7 +11,7 @@ mode: "750" - name: Setup usersync - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} export PATH="${JAVA_HOME}/bin:${PATH}" {{ python_interpreter }} ./setup.py @@ -19,7 +19,7 @@ chdir: "{{ ranger_usersync_install_dir }}" - name: Render log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ ranger_usersync_install_dir }}/conf/log4j.properties" owner: "{{ ranger_user }}" @@ -27,7 +27,7 @@ mode: "750" - name: customise usersync configuration - template: + ansible.builtin.template: src: ranger-ugsync-site.xml.j2 dest: "{{ ranger_usersync_install_dir }}/ranger-ugsync-site.xml" owner: "{{ ranger_user }}" @@ -35,7 +35,7 @@ mode: "750" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ ranger_usersync_install_dir }}/jmxremote.password" owner: "{{ ranger_user }}" @@ -43,7 +43,7 @@ mode: "750" - name: Render ranger-usersync-services.sh - template: + ansible.builtin.template: src: ranger-usersync-services.sh.j2 dest: "{{ ranger_usersync_install_dir }}/ranger-usersync-services.sh" owner: "{{ ranger_user }}" diff --git a/roles/ranger/usersync/tasks/install.yml b/roles/ranger/usersync/tasks/install.yml index 2288b76c..b905cf4a 100644 --- a/roles/ranger/usersync/tasks/install.yml +++ b/roles/ranger/usersync/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common ranger installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.ranger.common tasks_from: install - name: Upload {{ ranger_usersync_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_usersync_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -17,7 +17,7 @@ diff: false - name: Extract {{ ranger_usersync_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_usersync_dist_file }}" dest: "{{ ranger_root_dir }}" group: root @@ -27,19 +27,19 @@ creates: "{{ ranger_root_dir }}/{{ ranger_usersync_release }}" - name: Create symbolic link to Ranger usersync installation - file: + ansible.builtin.file: src: "{{ ranger_root_dir }}/{{ ranger_usersync_release }}" dest: "{{ ranger_usersync_install_dir }}" state: link - name: Patch python interpreter for Ranger Usersync setup.py - replace: + ansible.builtin.replace: path: "{{ ranger_usersync_install_dir }}/setup.py" regexp: (.*)python\ updatepolicymgrpassword\.py(.*)?$ replace: \1{{ python_interpreter }} updatepolicymgrpassword.py\2 - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ ranger_usersync_pid_dir }}" state: directory owner: "{{ ranger_user }}" @@ -47,7 +47,7 @@ mode: "755" - name: Template ranger-usersync tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-ranger-usersync.conf.j2 dest: /etc/tmpfiles.d/ranger-usersync.conf owner: root @@ -55,7 +55,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ ranger_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -63,7 +63,7 @@ mode: "770" - name: Template Ranger Usersync service file - template: + ansible.builtin.template: src: ranger-usersync.service.j2 dest: /usr/lib/systemd/system/ranger-usersync.service owner: root diff --git a/roles/ranger/usersync/tasks/jmx-exporter.yml b/roles/ranger/usersync/tasks/jmx-exporter.yml index 9b741a31..bd9f4889 100644 --- a/roles/ranger/usersync/tasks/jmx-exporter.yml +++ b/roles/ranger/usersync/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/ru.yml" owner: root diff --git a/roles/ranger/usersync/tasks/kerberos.yml b/roles/ranger/usersync/tasks/kerberos.yml index 7df4f35d..5c06d1c1 100644 --- a/roles/ranger/usersync/tasks/kerberos.yml +++ b/roles/ranger/usersync/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure rangerusersync user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure rangerusersync's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/ranger/usersync/tasks/restart.yml b/roles/ranger/usersync/tasks/restart.yml index f16c4642..8f5bc965 100644 --- a/roles/ranger/usersync/tasks/restart.yml +++ b/roles/ranger/usersync/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Ranger Usersync - service: + ansible.builtin.service: name: ranger-usersync state: restarted enabled: "{{ ranger_usersync_start_on_boot }}" diff --git a/roles/ranger/usersync/tasks/ssl-tls.yml b/roles/ranger/usersync/tasks/ssl-tls.yml index feb78f15..13ed6cb2 100644 --- a/roles/ranger/usersync/tasks/ssl-tls.yml +++ b/roles/ranger/usersync/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Ensure ranger usersync keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -11,7 +11,7 @@ keystore_password: "{{ ranger_keystore_password }}" - name: Ensure ranger usersync truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/ranger/usersync/tasks/start.yml b/roles/ranger/usersync/tasks/start.yml index 06912990..d011ede3 100644 --- a/roles/ranger/usersync/tasks/start.yml +++ b/roles/ranger/usersync/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Ranger Usersync - service: + ansible.builtin.service: name: ranger-usersync state: started enabled: "{{ ranger_usersync_start_on_boot }}" diff --git a/roles/ranger/usersync/tasks/status.yml b/roles/ranger/usersync/tasks/status.yml index d86348a6..de28b7e9 100644 --- a/roles/ranger/usersync/tasks/status.yml +++ b/roles/ranger/usersync/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert ranger-usersync is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['ranger-usersync.service'].state == "running" quiet: true diff --git a/roles/ranger/usersync/tasks/stop.yml b/roles/ranger/usersync/tasks/stop.yml index 5d1a88ca..f9d50428 100644 --- a/roles/ranger/usersync/tasks/stop.yml +++ b/roles/ranger/usersync/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Ranger Usersync - service: + ansible.builtin.service: name: ranger-usersync state: stopped enabled: "{{ ranger_usersync_start_on_boot }}" diff --git a/roles/spark/client/tasks/config.yml b/roles/spark/client/tasks/config.yml index 9c226319..f027a73b 100644 --- a/roles/spark/client/tasks/config.yml +++ b/roles/spark/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ spark_client_conf_dir }}/" dest: "{{ spark_client_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template spark-env.sh - template: + ansible.builtin.template: src: spark-env.sh.j2 dest: "{{ spark_client_conf_dir }}/spark-env.sh" owner: root @@ -24,7 +24,7 @@ spark_env: "{{ spark_env_common }}" - name: Template spark-defaults.conf - template: + ansible.builtin.template: src: spark-defaults.conf.j2 dest: "{{ spark_client_conf_dir }}/spark-defaults.conf" owner: root @@ -34,7 +34,7 @@ spark_defaults: "{{ spark_defaults_common | combine(spark_defaults_client) }}" - name: Template hive-site.xml for spark - template: + ansible.builtin.template: src: hive-site.xml.j2 dest: "{{ spark_client_conf_dir }}/hive-site.xml" owner: root @@ -42,7 +42,7 @@ mode: "644" - name: Copy hbase-site.xml - copy: + ansible.builtin.copy: src: "{{ hbase_client_conf_dir }}/hbase-site.xml" dest: "{{ spark_client_conf_dir }}/hbase-site.xml" owner: root diff --git a/roles/spark/client/tasks/install.yml b/roles/spark/client/tasks/install.yml index 27a2652e..2a52d2dd 100644 --- a/roles/spark/client/tasks/install.yml +++ b/roles/spark/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure spark common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: install - name: Upload spark hbase jar - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ spark_hbase_dist_file }}" dest: "{{ spark_root_dir }}/{{ spark_release }}/jars" owner: root @@ -18,7 +18,7 @@ diff: false - name: Copy audience-annotations dependency - copy: + ansible.builtin.copy: src: "{{ hbase_install_dir }}/lib/client-facing-thirdparty/audience-annotations-0.5.0.jar" dest: "{{ spark_root_dir }}/{{ spark_release }}/jars" owner: root @@ -29,7 +29,7 @@ diff: false - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ spark_client_conf_dir }}" state: directory owner: root @@ -37,7 +37,7 @@ mode: "755" - name: "Render /usr/bin/{{ spark_version }}-submit command" - template: + ansible.builtin.template: src: spark-submit-command.j2 dest: "/usr/bin/{{ spark_version }}-submit" owner: root @@ -45,7 +45,7 @@ mode: "755" - name: "Render /usr/bin/{{ spark_version }}-shell command" - template: + ansible.builtin.template: src: spark-shell-command.j2 dest: "/usr/bin/{{ spark_version }}-shell" owner: root @@ -53,7 +53,7 @@ mode: "755" - name: "Render /usr/bin/{{ spark_version }}-sql command" - template: + ansible.builtin.template: src: spark-sql-command.j2 dest: "/usr/bin/{{ spark_version }}-sql" owner: root @@ -61,7 +61,7 @@ mode: "755" - name: "Render /usr/bin/py{{ spark_version }} command" - template: + ansible.builtin.template: src: pyspark-command.j2 dest: "/usr/bin/py{{ spark_version }}" owner: root diff --git a/roles/spark/client/tasks/kerberos.yml b/roles/spark/client/tasks/kerberos.yml index 08ba7c55..56422f66 100644 --- a/roles/spark/client/tasks/kerberos.yml +++ b/roles/spark/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure kerberos common installation steps - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure spark user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure spark keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/spark/common/tasks/hdfs_user.yml b/roles/spark/common/tasks/hdfs_user.yml index d5cdae46..b68840ed 100644 --- a/roles/spark/common/tasks/hdfs_user.yml +++ b/roles/spark/common/tasks/hdfs_user.yml @@ -4,7 +4,7 @@ --- # Create spark user on HDFS NameNodes - name: Ensure spark user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ spark_user }}" diff --git a/roles/spark/common/tasks/install.yml b/roles/spark/common/tasks/install.yml index db3391c4..27760345 100644 --- a/roles/spark/common/tasks/install.yml +++ b/roles/spark/common/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ spark_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ spark_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ spark_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ spark_dist_file }}" dest: "{{ spark_root_dir }}" owner: root @@ -22,20 +22,20 @@ creates: "{{ spark_root_dir }}/{{ spark_release }}" - name: Create symbolic link to Spark installation - file: + ansible.builtin.file: src: "{{ spark_root_dir }}/{{ spark_release }}" dest: "{{ spark_install_dir }}" state: link - name: Ensure spark user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ spark_user }}" group: "{{ hadoop_group }}" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ spark_pid_dir }}" state: directory owner: "{{ spark_user }}" @@ -43,7 +43,7 @@ mode: "750" - name: Template spark tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-spark.conf.j2 dest: "/etc/tmpfiles.d/{{ spark_version }}.conf" owner: root @@ -51,7 +51,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ spark_log_dir }}" state: directory owner: "{{ spark_user }}" diff --git a/roles/spark/historyserver/tasks/config.yml b/roles/spark/historyserver/tasks/config.yml index 8071dd80..e261695e 100644 --- a/roles/spark/historyserver/tasks/config.yml +++ b/roles/spark/historyserver/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ spark_hs_conf_dir }}/" dest: "{{ spark_hs_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template spark-env.sh - template: + ansible.builtin.template: src: spark-env.sh.j2 dest: "{{ spark_hs_conf_dir }}/spark-env.sh" owner: root @@ -24,7 +24,7 @@ spark_env: "{{ spark_env_common | combine(spark_env_hs) }}" - name: Template spark-defaults.conf - template: + ansible.builtin.template: src: spark-defaults.conf.j2 dest: "{{ spark_hs_conf_dir }}/spark-defaults.conf" owner: root @@ -34,7 +34,7 @@ spark_defaults: "{{ spark_defaults_common | combine(spark_defaults_hs) }}" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: '{{ spark_hs_conf_dir }}/jmxremote.password' owner: root @@ -42,7 +42,7 @@ mode: "644" - name: Template {{ spark_version | capitalize }} History Server log4j file - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ spark_hs_conf_dir }}/log4j.properties" owner: root diff --git a/roles/spark/historyserver/tasks/install.yml b/roles/spark/historyserver/tasks/install.yml index 96e503e8..b6adad33 100644 --- a/roles/spark/historyserver/tasks/install.yml +++ b/roles/spark/historyserver/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure spark common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.spark.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ spark_hs_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template {{ spark_version | capitalize }} History Server service file - template: + ansible.builtin.template: src: spark-history-server.service.j2 dest: "/usr/lib/systemd/system/{{ spark_version }}-history-server.service" owner: root diff --git a/roles/spark/historyserver/tasks/jmx-exporter.yml b/roles/spark/historyserver/tasks/jmx-exporter.yml index 1a1b723f..cf0f990a 100644 --- a/roles/spark/historyserver/tasks/jmx-exporter.yml +++ b/roles/spark/historyserver/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/{{ spark_version }}-hs.yml" owner: root diff --git a/roles/spark/historyserver/tasks/kerberos.yml b/roles/spark/historyserver/tasks/kerberos.yml index a12f7832..88b43ceb 100644 --- a/roles/spark/historyserver/tasks/kerberos.yml +++ b/roles/spark/historyserver/tasks/kerberos.yml @@ -3,19 +3,19 @@ --- - name: Ensure kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure hadoop kerberos common installation steps are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Spark HS keytabs creation block: - name: Ensure spark user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -26,7 +26,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab exists - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -40,7 +40,7 @@ - name: Spark HS keytabs check block: - name: Ensure spark keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -51,7 +51,7 @@ mode: "600" - name: Ensure HTTP spnego keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/spark/historyserver/tasks/restart.yml b/roles/spark/historyserver/tasks/restart.yml index 94397687..6b8694b5 100644 --- a/roles/spark/historyserver/tasks/restart.yml +++ b/roles/spark/historyserver/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: "Restart {{ spark_version | capitalize }} History Server" - service: + ansible.builtin.service: name: "{{ spark_version }}-history-server" state: restarted enabled: "{{ spark_hs_start_on_boot }}" diff --git a/roles/spark/historyserver/tasks/ssl-tls.yml b/roles/spark/historyserver/tasks/ssl-tls.yml index 1db69aae..aa39cd4c 100644 --- a/roles/spark/historyserver/tasks/ssl-tls.yml +++ b/roles/spark/historyserver/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -13,7 +13,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure spark keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -21,7 +21,7 @@ keystore_password: "{{ spark_keystore_password }}" - name: Ensure spark truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/spark/historyserver/tasks/start.yml b/roles/spark/historyserver/tasks/start.yml index 526ad3e1..714fd391 100644 --- a/roles/spark/historyserver/tasks/start.yml +++ b/roles/spark/historyserver/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: "Start {{ spark_version | capitalize }} History Server" - service: + ansible.builtin.service: name: "{{ spark_version }}-history-server" state: started enabled: "{{ spark_hs_start_on_boot }}" diff --git a/roles/spark/historyserver/tasks/status.yml b/roles/spark/historyserver/tasks/status.yml index f7d077fd..8dad8228 100644 --- a/roles/spark/historyserver/tasks/status.yml +++ b/roles/spark/historyserver/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: "Assert {{ spark_version | capitalize }} is running" - assert: + ansible.builtin.assert: that: - ansible_facts.services['{{ spark_version }}-history-server.service'].state == "running" quiet: true diff --git a/roles/spark/historyserver/tasks/stop.yml b/roles/spark/historyserver/tasks/stop.yml index 21b5d691..cdc97b7e 100644 --- a/roles/spark/historyserver/tasks/stop.yml +++ b/roles/spark/historyserver/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: "Stop {{ spark_version | capitalize }} History Server" - service: + ansible.builtin.service: name: "{{ spark_version }}-history-server" state: stopped enabled: "{{ spark_hs_start_on_boot }}" diff --git a/roles/utils/group/tasks/main.yml b/roles/utils/group/tasks/main.yml index d2537bd8..70b783cb 100644 --- a/roles/utils/group/tasks/main.yml +++ b/roles/utils/group/tasks/main.yml @@ -3,5 +3,5 @@ --- - name: Add {{ group }} group - group: + ansible.builtin.group: name: "{{ group }}" diff --git a/roles/utils/jceks/tasks/local.yml b/roles/utils/jceks/tasks/local.yml index 2151b6e3..a21f6904 100644 --- a/roles/utils/jceks/tasks/local.yml +++ b/roles/utils/jceks/tasks/local.yml @@ -3,12 +3,12 @@ --- - name: "Remove previous JCEKS file {{ jceks_file }}" - file: + ansible.builtin.file: path: "{{ jceks_file }}" state: absent - name: "Create JCEKS file {{ jceks_file }}" - command: >- + ansible.builtin.command: >- {{ hadoop_install_dir }}/bin/hadoop credential create {{ item.property }} -value '{{ item.value }}' @@ -20,7 +20,7 @@ no_log: true - name: "Ensure {{ jceks_file }} permissions / owner" - file: + ansible.builtin.file: path: "{{ jceks_file }}" mode: "{{ mode }}" owner: "{{ owner }}" diff --git a/roles/utils/kerberos/tasks/check_secure_keytab.yml b/roles/utils/kerberos/tasks/check_secure_keytab.yml index a19f3a9b..f7f3efe5 100644 --- a/roles/utils/kerberos/tasks/check_secure_keytab.yml +++ b/roles/utils/kerberos/tasks/check_secure_keytab.yml @@ -3,14 +3,14 @@ --- - name: Check kinit for {{ principal }} - shell: | + ansible.builtin.shell: | kinit -kt {{ keytabs_dir }}/{{ keytab }} {{ principal }}@{{ realm }} -c /tmp/check_keytab_cache klist /tmp/check_keytab_cache | grep "Default principal: {{ principal }}@{{ realm }}" rm -f /tmp/check_keytab_cache changed_when: false - name: Set keytab permissions and ownership for {{ principal }} - file: + ansible.builtin.file: path: "{{ keytabs_dir }}/{{ keytab }}" owner: "{{ user | default(omit) }}" group: "{{ group | default(omit) }}" diff --git a/roles/utils/kerberos/tasks/create_headless_principal_keytab.yml b/roles/utils/kerberos/tasks/create_headless_principal_keytab.yml index f04a3658..71504597 100644 --- a/roles/utils/kerberos/tasks/create_headless_principal_keytab.yml +++ b/roles/utils/kerberos/tasks/create_headless_principal_keytab.yml @@ -5,22 +5,22 @@ # First Step : Try to fetch all headless_keytabs from hosts - name: Init headless_keytab fact # In the documentation of meta clear_facts: facts setted by set_fact are not cleared, so we must set it to empty string. - set_fact: + ansible.builtin.set_fact: headless_keytab: "" - name: Check if headless_keytab file exists - stat: + ansible.builtin.stat: path: "{{ keytabs_dir }}/{{ keytab }}" register: headless_keytab_stat - name: Fetch content of headless_keytab if exists - slurp: + ansible.builtin.slurp: src: "{{ keytabs_dir }}/{{ keytab }}" register: headless_keytab_encoded when: headless_keytab_stat.stat.exists - name: Set local facts where headless_keytab exists - set_fact: + ansible.builtin.set_fact: headless_keytab: "{{ headless_keytab_encoded.content }}" when: headless_keytab_stat.stat.exists @@ -28,35 +28,35 @@ vars: # Get all local "headless_keytab" and remove undefined headless_keytab_list: "{{ ansible_play_hosts | map('extract', hostvars, 'headless_keytab') | select | list }}" - set_fact: + ansible.builtin.set_fact: headless_keytab: "{{ headless_keytab_list | first }}" when: headless_keytab_list | length > 0 run_once: true # Second Step : Create a new headless_keytab if not exists - name: Create headless keytab - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab when: headless_keytab | length == 0 run_once: true - name: Load the new headless_keytab when not exists - slurp: + ansible.builtin.slurp: src: "{{ keytabs_dir }}/{{ keytab }}" register: headless_keytab_encoded run_once: true when: headless_keytab | length == 0 - name: Set fact the new headless_keytab when not exists - set_fact: + ansible.builtin.set_fact: headless_keytab: "{{ headless_keytab_encoded.content }}" run_once: true when: headless_keytab | length == 0 # Final Step : Copy the headless_keytab to all hosts with an idempotent behavior - name: Copy headless_keytab to all hosts - copy: + ansible.builtin.copy: content: "{{ headless_keytab | b64decode }}" dest: "{{ keytabs_dir }}/{{ keytab }}" owner: "{{ user }}" @@ -65,5 +65,5 @@ no_log: true - name: Reset headless_keytab fact for next usage - set_fact: + ansible.builtin.set_fact: headless_keytab: "" diff --git a/roles/utils/kerberos/tasks/create_principal_keytab.yml b/roles/utils/kerberos/tasks/create_principal_keytab.yml index 87879e14..488bdef1 100644 --- a/roles/utils/kerberos/tasks/create_principal_keytab.yml +++ b/roles/utils/kerberos/tasks/create_principal_keytab.yml @@ -3,13 +3,13 @@ --- - name: Create principal for {{ principal }} - krb_principal: + tosit.tdp.krb_principal: admin_principal: "{{ kadmin_principal }}" admin_password: "{{ kadmin_password }}" principal: "{{ principal }}" - name: Generate keytab for {{ principal }} - krb_keytab: + tosit.tdp.krb_keytab: admin_principal: "{{ kadmin_principal }}" admin_password: "{{ kadmin_password }}" principal: "{{ principal }}" diff --git a/roles/utils/kerberos/tasks/install.yml b/roles/utils/kerberos/tasks/install.yml index bf9fe3f7..da082aa7 100644 --- a/roles/utils/kerberos/tasks/install.yml +++ b/roles/utils/kerberos/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Ensure {{ keytabs_dir }} exists - file: + ansible.builtin.file: path: "{{ keytabs_dir }}" state: directory owner: root diff --git a/roles/utils/ranger_policies/tasks/main.yml b/roles/utils/ranger_policies/tasks/main.yml index b58ffd3e..37376b64 100644 --- a/roles/utils/ranger_policies/tasks/main.yml +++ b/roles/utils/ranger_policies/tasks/main.yml @@ -12,7 +12,4 @@ force_basic_auth: true loop: "{{ ranger_policies }}" loop_control: - label: - name: "{{ item.name | default('missing name') }}" - service: "{{ item.service | default('missing service') }}" - state: "{{ item.state | default('present') }}" + label: "{'name': '{{ item.name | default('missing name') }}', 'service': '{{ item.service | default('missing service') }}', 'state': '{{ item.state | default('present') }}'}" diff --git a/roles/utils/ssl_tls/tasks/convert_cert_key.yml b/roles/utils/ssl_tls/tasks/convert_cert_key.yml index e94eab75..e48a17ab 100644 --- a/roles/utils/ssl_tls/tasks/convert_cert_key.yml +++ b/roles/utils/ssl_tls/tasks/convert_cert_key.yml @@ -3,7 +3,7 @@ --- - name: Convert cert and key to pk12 - shell: | + ansible.builtin.shell: | openssl pkcs12 \ -export \ -in {{ certs_dir }}/{{ ansible_fqdn }}.pem \ @@ -17,7 +17,7 @@ creates: "{{ certs_dir }}/{{ ansible_fqdn }}.p12" - name: Set permissions and ownership on pk12 certificate - file: + ansible.builtin.file: path: "{{ certs_dir }}/{{ ansible_fqdn }}.p12" owner: root group: root diff --git a/roles/utils/ssl_tls/tasks/create_keystore.yml b/roles/utils/ssl_tls/tasks/create_keystore.yml index 08645722..46c8cdc5 100644 --- a/roles/utils/ssl_tls/tasks/create_keystore.yml +++ b/roles/utils/ssl_tls/tasks/create_keystore.yml @@ -3,12 +3,12 @@ --- - name: Ensure pkcs12 truststore is present - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.ssl_tls tasks_from: convert_cert_key - name: Create keystore and add Certificate Authority into it - shell: | + ansible.builtin.shell: | keytool \ -importkeystore \ -deststorepass {{ keystore_password }} \ @@ -31,7 +31,7 @@ when: (src_alias is undefined) and (dest_alias is undefined) - name: Create keystore and add Certificate Authority into it - shell: | + ansible.builtin.shell: | keytool \ -importkeystore \ -deststorepass {{ keystore_password }} \ @@ -55,7 +55,7 @@ when: (src_alias is defined) or (dest_alias is defined) - name: Set permissions and ownership on keystore - file: + ansible.builtin.file: path: "{{ keystore_location }}" owner: root group: "{{ hadoop_group }}" diff --git a/roles/utils/ssl_tls/tasks/create_truststore.yml b/roles/utils/ssl_tls/tasks/create_truststore.yml index 46313d62..c95d0154 100644 --- a/roles/utils/ssl_tls/tasks/create_truststore.yml +++ b/roles/utils/ssl_tls/tasks/create_truststore.yml @@ -3,7 +3,7 @@ --- - name: Create truststore - shell: | + ansible.builtin.shell: | keytool \ -keystore {{ truststore_location }} \ -deststorepass {{ truststore_password }} \ @@ -15,7 +15,7 @@ creates: "{{ truststore_location }}" - name: Set permissions and ownership on trustore - file: + ansible.builtin.file: path: "{{ truststore_location }}" owner: root group: root diff --git a/roles/utils/ssl_tls/tasks/verify_truststore.yml b/roles/utils/ssl_tls/tasks/verify_truststore.yml index a7ddcd43..40a24337 100644 --- a/roles/utils/ssl_tls/tasks/verify_truststore.yml +++ b/roles/utils/ssl_tls/tasks/verify_truststore.yml @@ -3,7 +3,7 @@ --- - name: Verify alias on java trustore - shell: | + ansible.builtin.shell: | keytool \ -list \ -keystore {{ truststore_location }} \ @@ -14,7 +14,7 @@ ignore_errors: true - name: Add alias Authority to trustore - shell: | + ansible.builtin.shell: | keytool \ -import \ -keystore {{ truststore_location }} \ diff --git a/roles/utils/user/tasks/main.yml b/roles/utils/user/tasks/main.yml index 6e6cb41c..77619b8f 100644 --- a/roles/utils/user/tasks/main.yml +++ b/roles/utils/user/tasks/main.yml @@ -3,6 +3,6 @@ --- - name: Add {{ user }} user - user: + ansible.builtin.user: name: "{{ user }}" group: "{{ group }}" diff --git a/roles/utils/xml/tasks/merge.yml b/roles/utils/xml/tasks/merge.yml index 00a9a9fb..6f4830ba 100644 --- a/roles/utils/xml/tasks/merge.yml +++ b/roles/utils/xml/tasks/merge.yml @@ -3,7 +3,7 @@ --- - name: Overwrite existing properties - xml: + community.general.xml: path: "{{ configuration_file }}" xpath: /configuration/property[name='{{ item.key }}']/value value: "{{ item.value }}" @@ -13,7 +13,7 @@ ignore_errors: true - name: Add new properties - xml: + community.general.xml: path: "{{ configuration_file }}" xpath: /configuration add_children: diff --git a/roles/yarn/apptimelineserver/tasks/config.yml b/roles/yarn/apptimelineserver/tasks/config.yml index 34c74252..24cc943d 100644 --- a/roles/yarn/apptimelineserver/tasks/config.yml +++ b/roles/yarn/apptimelineserver/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_ats_conf_dir }}/" dest: "{{ hadoop_ats_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_ats_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_ats_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_ats_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_ats_conf_dir }}/core-site.xml" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ hadoop_ats_conf_dir }}/hdfs-site.xml" owner: root @@ -50,7 +50,7 @@ remote_src: true - name: Render yarn-site.xml - template: + ansible.builtin.template: src: yarn-site.xml.j2 dest: "{{ hadoop_ats_conf_dir }}/yarn-site.xml" owner: root @@ -58,7 +58,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_ats_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/yarn/apptimelineserver/tasks/install.yml b/roles/yarn/apptimelineserver/tasks/install.yml index 125de99d..445fb63b 100644 --- a/roles/yarn/apptimelineserver/tasks/install.yml +++ b/roles/yarn/apptimelineserver/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common yarn installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_ats_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template YARN Timeline Server service file - template: + ansible.builtin.template: src: hadoop-yarn-timelineserver.service.j2 dest: /usr/lib/systemd/system/hadoop-yarn-timelineserver.service owner: root diff --git a/roles/yarn/apptimelineserver/tasks/jmx-exporter.yml b/roles/yarn/apptimelineserver/tasks/jmx-exporter.yml index e743813d..c170f361 100644 --- a/roles/yarn/apptimelineserver/tasks/jmx-exporter.yml +++ b/roles/yarn/apptimelineserver/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/ats.yml" owner: root diff --git a/roles/yarn/apptimelineserver/tasks/kerberos.yml b/roles/yarn/apptimelineserver/tasks/kerberos.yml index 43fb7a52..38c3635e 100644 --- a/roles/yarn/apptimelineserver/tasks/kerberos.yml +++ b/roles/yarn/apptimelineserver/tasks/kerberos.yml @@ -3,19 +3,19 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: YARN ATS keytabs creation block: - name: Ensure yarn ats user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -26,7 +26,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -40,7 +40,7 @@ - name: YARN ATS keytabs check block: - name: Ensure yarn ats user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -51,7 +51,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/yarn/apptimelineserver/tasks/restart.yml b/roles/yarn/apptimelineserver/tasks/restart.yml index 8f51bae9..50ff76a0 100644 --- a/roles/yarn/apptimelineserver/tasks/restart.yml +++ b/roles/yarn/apptimelineserver/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart YARN Timeline Server - service: + ansible.builtin.service: name: hadoop-yarn-timelineserver state: restarted enabled: "{{ yarn_ts_start_on_boot }}" diff --git a/roles/yarn/apptimelineserver/tasks/ssl-tls.yml b/roles/yarn/apptimelineserver/tasks/ssl-tls.yml index 9bc800d6..2069419c 100644 --- a/roles/yarn/apptimelineserver/tasks/ssl-tls.yml +++ b/roles/yarn/apptimelineserver/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_ats_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure yarn keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure yarn truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/yarn/apptimelineserver/tasks/start.yml b/roles/yarn/apptimelineserver/tasks/start.yml index 68cdcbdb..bb5c7de1 100644 --- a/roles/yarn/apptimelineserver/tasks/start.yml +++ b/roles/yarn/apptimelineserver/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Timeline Server - service: + ansible.builtin.service: name: hadoop-yarn-timelineserver state: started enabled: "{{ yarn_ts_start_on_boot }}" diff --git a/roles/yarn/apptimelineserver/tasks/status.yml b/roles/yarn/apptimelineserver/tasks/status.yml index fe31e583..528796af 100644 --- a/roles/yarn/apptimelineserver/tasks/status.yml +++ b/roles/yarn/apptimelineserver/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-yarn-timelineserver is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-timelineserver.service'].state == "running" quiet: true diff --git a/roles/yarn/apptimelineserver/tasks/stop.yml b/roles/yarn/apptimelineserver/tasks/stop.yml index 01c0db97..4a1dd781 100644 --- a/roles/yarn/apptimelineserver/tasks/stop.yml +++ b/roles/yarn/apptimelineserver/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop YARN Timeline Server - service: + ansible.builtin.service: name: hadoop-yarn-timelineserver state: stopped enabled: "{{ yarn_ts_start_on_boot }}" diff --git a/roles/yarn/client/tasks/config.yml b/roles/yarn/client/tasks/config.yml index 06cc73b0..5f019e79 100644 --- a/roles/yarn/client/tasks/config.yml +++ b/roles/yarn/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Render yarn-site.xml - template: + ansible.builtin.template: src: yarn-site.xml.j2 dest: "{{ hadoop_client_conf_dir }}/yarn-site.xml" owner: root diff --git a/roles/yarn/client/tasks/install.yml b/roles/yarn/client/tasks/install.yml index c582d264..f02a62c3 100644 --- a/roles/yarn/client/tasks/install.yml +++ b/roles/yarn/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common yarn installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.common tasks_from: install - name: Render /usr/bin/yarn command - template: + ansible.builtin.template: src: yarn-command.j2 dest: /usr/bin/yarn owner: root diff --git a/roles/yarn/client/tasks/kerberos.yml b/roles/yarn/client/tasks/kerberos.yml index d88723a5..328958f3 100644 --- a/roles/yarn/client/tasks/kerberos.yml +++ b/roles/yarn/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure yarn user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_headless_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Ensure yarn user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/yarn/common/tasks/install.yml b/roles/yarn/common/tasks/install.yml index 40bf5335..8a78d5cb 100644 --- a/roles/yarn/common/tasks/install.yml +++ b/roles/yarn/common/tasks/install.yml @@ -3,19 +3,19 @@ --- - name: Ensure common hadoop installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: install - name: Ensure yarn user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ yarn_user }}" group: "{{ hadoop_group }}" - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hadoop_yarn_pid_dir }}" state: directory owner: "{{ yarn_user }}" @@ -23,7 +23,7 @@ mode: "755" - name: Template hadoop yarn tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hadoop-yarn.conf.j2 dest: /etc/tmpfiles.d/hadoop-yarn.conf owner: root @@ -31,7 +31,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hadoop_log_dir }}" state: directory owner: "{{ yarn_user }}" diff --git a/roles/yarn/jobhistoryserver/tasks/config.yml b/roles/yarn/jobhistoryserver/tasks/config.yml index d50b27c0..53740308 100644 --- a/roles/yarn/jobhistoryserver/tasks/config.yml +++ b/roles/yarn/jobhistoryserver/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_jhs_conf_dir }}/" dest: "{{ hadoop_jhs_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_jhs_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_jhs_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_jhs_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_jhs_conf_dir }}/core-site.xml" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ hadoop_jhs_conf_dir }}/hdfs-site.xml" owner: root @@ -50,7 +50,7 @@ remote_src: true - name: Render yarn-site.xml - template: + ansible.builtin.template: src: yarn-site.xml.j2 dest: "{{ hadoop_jhs_conf_dir }}/yarn-site.xml" owner: root @@ -58,7 +58,7 @@ mode: "644" - name: Render mapred-site.xml - template: + ansible.builtin.template: src: mapred-site.xml.j2 dest: "{{ hadoop_jhs_conf_dir }}/mapred-site.xml" owner: root @@ -66,7 +66,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_jhs_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/yarn/jobhistoryserver/tasks/install.yml b/roles/yarn/jobhistoryserver/tasks/install.yml index f01a5a02..d13e524a 100644 --- a/roles/yarn/jobhistoryserver/tasks/install.yml +++ b/roles/yarn/jobhistoryserver/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common hadoop installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: install - name: Create directory for pid - file: + ansible.builtin.file: path: "{{ hadoop_mapred_pid_dir }}" state: directory owner: "{{ mapred_user }}" @@ -16,7 +16,7 @@ mode: "755" - name: Template hadoop mapred tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hadoop-mapred.conf.j2 dest: /etc/tmpfiles.d/hadoop-mapred.conf owner: root @@ -24,7 +24,7 @@ mode: "644" - name: Template hadoop yarn tmpfiles.d - template: + ansible.builtin.template: src: tmpfiles-hadoop-yarn.conf.j2 dest: /etc/tmpfiles.d/hadoop-yarn.conf owner: root @@ -32,7 +32,7 @@ mode: "644" - name: Create log directory - file: + ansible.builtin.file: path: "{{ hadoop_log_dir }}" state: directory group: "{{ hadoop_group }}" @@ -40,7 +40,7 @@ mode: "750" - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_jhs_conf_dir }}" state: directory owner: root @@ -48,7 +48,7 @@ mode: "755" - name: Template Mapred History Server service file - template: + ansible.builtin.template: src: hadoop-mapred-jobhistoryserver.service.j2 dest: /usr/lib/systemd/system/hadoop-mapred-jobhistoryserver.service owner: root diff --git a/roles/yarn/jobhistoryserver/tasks/jmx-exporter.yml b/roles/yarn/jobhistoryserver/tasks/jmx-exporter.yml index 6bfe3dce..3c9639a9 100644 --- a/roles/yarn/jobhistoryserver/tasks/jmx-exporter.yml +++ b/roles/yarn/jobhistoryserver/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/jhs.yml" owner: root diff --git a/roles/yarn/jobhistoryserver/tasks/kerberos.yml b/roles/yarn/jobhistoryserver/tasks/kerberos.yml index b35b7a9b..385dc80c 100644 --- a/roles/yarn/jobhistoryserver/tasks/kerberos.yml +++ b/roles/yarn/jobhistoryserver/tasks/kerberos.yml @@ -3,19 +3,19 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: YARN JHS keytabs creation block: - name: Ensure mapred jhs user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -26,7 +26,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -40,7 +40,7 @@ - name: YARN JHS keytabs check block: - name: Ensure mapred jhs user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -51,7 +51,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/yarn/jobhistoryserver/tasks/restart.yml b/roles/yarn/jobhistoryserver/tasks/restart.yml index 56022c0c..0014b985 100644 --- a/roles/yarn/jobhistoryserver/tasks/restart.yml +++ b/roles/yarn/jobhistoryserver/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Mapred History Server - service: + ansible.builtin.service: name: hadoop-mapred-jobhistoryserver state: restarted enabled: "{{ mapred_jhs_start_on_boot }}" diff --git a/roles/yarn/jobhistoryserver/tasks/ssl-tls.yml b/roles/yarn/jobhistoryserver/tasks/ssl-tls.yml index 09303e0d..e458c45c 100644 --- a/roles/yarn/jobhistoryserver/tasks/ssl-tls.yml +++ b/roles/yarn/jobhistoryserver/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_jhs_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Render ssl-client.xml - template: + ansible.builtin.template: src: ssl-client.xml.j2 dest: "{{ hadoop_jhs_conf_dir }}/ssl-client.xml" owner: root @@ -19,7 +19,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -29,7 +29,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure yarn keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -37,7 +37,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure yarn truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: @@ -45,7 +45,7 @@ truststore_password: "{{ hadoop_truststore_password }}" - name: Ensure yarn truststore is valid - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: diff --git a/roles/yarn/jobhistoryserver/tasks/start.yml b/roles/yarn/jobhistoryserver/tasks/start.yml index 186522e1..37e7a58e 100644 --- a/roles/yarn/jobhistoryserver/tasks/start.yml +++ b/roles/yarn/jobhistoryserver/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Mapred History Server - service: + ansible.builtin.service: name: hadoop-mapred-jobhistoryserver state: started enabled: "{{ mapred_jhs_start_on_boot }}" diff --git a/roles/yarn/jobhistoryserver/tasks/status.yml b/roles/yarn/jobhistoryserver/tasks/status.yml index 8cfff695..ffedc2e1 100644 --- a/roles/yarn/jobhistoryserver/tasks/status.yml +++ b/roles/yarn/jobhistoryserver/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-mapred-jobhistoryserver is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-mapred-jobhistoryserver.service'].state == "running" quiet: true diff --git a/roles/yarn/jobhistoryserver/tasks/stop.yml b/roles/yarn/jobhistoryserver/tasks/stop.yml index 10011bee..cf791088 100644 --- a/roles/yarn/jobhistoryserver/tasks/stop.yml +++ b/roles/yarn/jobhistoryserver/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Mapred History Server - service: + ansible.builtin.service: name: hadoop-mapred-jobhistoryserver state: stopped enabled: "{{ mapred_jhs_start_on_boot }}" diff --git a/roles/yarn/nodemanager/tasks/config.yml b/roles/yarn/nodemanager/tasks/config.yml index 788d100b..6462c495 100644 --- a/roles/yarn/nodemanager/tasks/config.yml +++ b/roles/yarn/nodemanager/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_nm_conf_dir }}/" dest: "{{ hadoop_nm_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_nm_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_nm_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_nm_conf_dir }}/log4j.properties" owner: root @@ -33,7 +33,7 @@ mode: "644" - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_nm_conf_dir }}/core-site.xml" owner: root @@ -41,7 +41,7 @@ mode: "644" - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ hadoop_nm_conf_dir }}/hdfs-site.xml" remote_src: true @@ -50,7 +50,7 @@ mode: "644" - name: Render yarn-site.xml - template: + ansible.builtin.template: src: yarn-site.xml.j2 dest: "{{ hadoop_nm_conf_dir }}/yarn-site.xml" owner: root @@ -61,7 +61,7 @@ # It seems to be mandatory for it to be at /../etc/hadoop/container-executor.cfg # See https://docs.cloudera.com/documentation/enterprise/5-9-x/topics/cdh_sg_yarn_security.html - name: Render container-executor.cfg - template: + ansible.builtin.template: src: container-executor.cfg.j2 dest: "{{ hadoop_install_dir }}/etc/hadoop/container-executor.cfg" owner: root @@ -69,7 +69,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_nm_conf_dir }}/jmxremote.password" owner: root diff --git a/roles/yarn/nodemanager/tasks/install.yml b/roles/yarn/nodemanager/tasks/install.yml index ae4e0696..0c2fbcec 100644 --- a/roles/yarn/nodemanager/tasks/install.yml +++ b/roles/yarn/nodemanager/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common yarn installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.common tasks_from: install - name: Create YARN recover directory - file: + ansible.builtin.file: path: "{{ yarn_site['yarn.nodemanager.recovery.dir'] }}" state: directory owner: "{{ yarn_user }}" @@ -16,7 +16,7 @@ mode: "750" - name: Create YARN Nodemanager local directory - file: + ansible.builtin.file: path: "{{ item | dirname }}" state: directory owner: "{{ yarn_user }}" @@ -28,7 +28,7 @@ loop: "{{ parent_directories + directories }}" - name: Create YARN log directory - file: + ansible.builtin.file: path: "{{ yarn_site['yarn.nodemanager.log-dirs'] }}" state: directory owner: "{{ yarn_user }}" @@ -36,7 +36,7 @@ mode: "755" - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_nm_conf_dir }}" state: directory owner: root @@ -44,7 +44,7 @@ mode: "755" - name: Template YARN NodeManager service file - template: + ansible.builtin.template: src: hadoop-yarn-nodemanager.service.j2 dest: /usr/lib/systemd/system/hadoop-yarn-nodemanager.service owner: root @@ -54,7 +54,7 @@ - systemctl daemon-reload - name: Set bin/container-executor ownership, group and permissions - file: + ansible.builtin.file: path: "{{ hadoop_install_dir }}/bin/container-executor" owner: root group: "{{ hadoop_group }}" @@ -62,7 +62,7 @@ when: cgroups_enabled - name: Create yarn cgroups dirs - file: + ansible.builtin.file: path: "{{ item.path }}" state: directory owner: "{{ item.owner }}" @@ -72,7 +72,7 @@ when: cgroups_enabled - name: Apply recursively mode to yarn cgroups dirs - file: + ansible.builtin.file: path: "{{ item.path }}" state: directory owner: "{{ item.owner }}" diff --git a/roles/yarn/nodemanager/tasks/jmx-exporter.yml b/roles/yarn/nodemanager/tasks/jmx-exporter.yml index 4f25b983..81938360 100644 --- a/roles/yarn/nodemanager/tasks/jmx-exporter.yml +++ b/roles/yarn/nodemanager/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/nm.yml" owner: root diff --git a/roles/yarn/nodemanager/tasks/kerberos.yml b/roles/yarn/nodemanager/tasks/kerberos.yml index 5b3be783..babe94c4 100644 --- a/roles/yarn/nodemanager/tasks/kerberos.yml +++ b/roles/yarn/nodemanager/tasks/kerberos.yml @@ -3,19 +3,19 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: YARN RM keytabs creation block: - name: Ensure yarn nm user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -26,7 +26,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -40,7 +40,7 @@ - name: YARN RM keytabs check block: - name: Ensure yarn nm user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -51,7 +51,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/yarn/nodemanager/tasks/restart.yml b/roles/yarn/nodemanager/tasks/restart.yml index ff5e27fb..91e33d89 100644 --- a/roles/yarn/nodemanager/tasks/restart.yml +++ b/roles/yarn/nodemanager/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart YARN Node Manager - service: + ansible.builtin.service: name: hadoop-yarn-nodemanager state: restarted enabled: "{{ yarn_nm_start_on_boot }}" diff --git a/roles/yarn/nodemanager/tasks/ssl-tls.yml b/roles/yarn/nodemanager/tasks/ssl-tls.yml index 8c0e62e9..af27912a 100644 --- a/roles/yarn/nodemanager/tasks/ssl-tls.yml +++ b/roles/yarn/nodemanager/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_nm_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -21,7 +21,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure yarn keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -29,7 +29,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure yarn truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: diff --git a/roles/yarn/nodemanager/tasks/start.yml b/roles/yarn/nodemanager/tasks/start.yml index 4ef4ff71..88177fb1 100644 --- a/roles/yarn/nodemanager/tasks/start.yml +++ b/roles/yarn/nodemanager/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start YARN node manager - service: + ansible.builtin.service: name: hadoop-yarn-nodemanager state: started enabled: "{{ yarn_nm_start_on_boot }}" diff --git a/roles/yarn/nodemanager/tasks/status.yml b/roles/yarn/nodemanager/tasks/status.yml index 4d231b09..1c0aebfe 100644 --- a/roles/yarn/nodemanager/tasks/status.yml +++ b/roles/yarn/nodemanager/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-yarn-nodemanager is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-nodemanager.service'].state == "running" quiet: true diff --git a/roles/yarn/nodemanager/tasks/stop.yml b/roles/yarn/nodemanager/tasks/stop.yml index f6a8f6b6..637ba735 100644 --- a/roles/yarn/nodemanager/tasks/stop.yml +++ b/roles/yarn/nodemanager/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop YARN node manager - service: + ansible.builtin.service: name: hadoop-yarn-nodemanager state: stopped enabled: "{{ yarn_nm_start_on_boot }}" diff --git a/roles/yarn/ranger/tasks/config.yml b/roles/yarn/ranger/tasks/config.yml index 8a9a0819..f4a0018f 100644 --- a/roles/yarn/ranger/tasks/config.yml +++ b/roles/yarn/ranger/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Template install.properties - template: + ansible.builtin.template: src: install_yarn.properties.j2 dest: "{{ ranger_yarn_install_dir }}/install.properties" owner: root @@ -16,26 +16,26 @@ # TODO: find a better way to do this - name: Backup {{ hadoop_install_dir }}/etc/hadoop - command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk + ansible.builtin.command: mv {{ hadoop_install_dir }}/etc/hadoop {{ hadoop_install_dir }}/etc/hadoop.bk args: creates: "{{ hadoop_install_dir }}/etc/hadoop.bk" - name: Create symbolic link from etc/hadoop in {{ hadoop_install_dir }} to actual Resourcemanager config dir - file: + ansible.builtin.file: src: "{{ hadoop_rm_conf_dir }}" dest: "{{ hadoop_install_dir }}/etc/hadoop" state: link # We also need to fix the path of the ranger-policymgr-ssl.xml containing the trustore properties in ranger-yarn-security.xml - name: Fix the path of ranger-policymgr-ssl.xml in ranger-yarn-security-changes.cfg - lineinfile: + ansible.builtin.lineinfile: path: "{{ ranger_yarn_install_dir }}/install/conf.templates/enable/ranger-yarn-security-changes.cfg" regexp: '^ranger.plugin.yarn.policy.rest.ssl.config.file\s+([^ ]+) (.*)$' line: 'ranger.plugin.yarn.policy.rest.ssl.config.file /etc/hadoop/conf.rm/ranger-policymgr-ssl.xml \2' backrefs: true - name: Run enable-yarn-plugin.sh - shell: | + ansible.builtin.shell: | export JAVA_HOME={{ java_home }} ./enable-yarn-plugin.sh args: diff --git a/roles/yarn/ranger/tasks/init.yml b/roles/yarn/ranger/tasks/init.yml index b683c8bc..701c9ef9 100644 --- a/roles/yarn/ranger/tasks/init.yml +++ b/roles/yarn/ranger/tasks/init.yml @@ -4,7 +4,7 @@ --- - name: Create YARN service run_once: true - uri: + ansible.builtin.uri: url: "{{ ranger_yarn_install_properties.POLICY_MGR_URL }}/service/plugins/services" method: POST body: diff --git a/roles/yarn/ranger/tasks/install.yml b/roles/yarn/ranger/tasks/install.yml index aa196cea..8db91f5a 100644 --- a/roles/yarn/ranger/tasks/install.yml +++ b/roles/yarn/ranger/tasks/install.yml @@ -3,7 +3,7 @@ --- - name: Upload {{ ranger_yarn_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ ranger_yarn_dist_file }}" dest: "{{ binaries_upload_dir }}" owner: root @@ -12,7 +12,7 @@ diff: false - name: Extract {{ ranger_yarn_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ ranger_yarn_dist_file }}" dest: "{{ hadoop_root_dir }}" group: root @@ -22,7 +22,7 @@ creates: "{{ hadoop_root_dir }}/{{ ranger_yarn_release }}" - name: Ensure right permissions on ranger libs - file: + ansible.builtin.file: path: "{{ hadoop_root_dir }}/{{ ranger_yarn_release }}" owner: root group: root @@ -31,7 +31,7 @@ state: directory - name: Create symbolic link to Ranger installation - file: + ansible.builtin.file: src: "{{ hadoop_root_dir }}/{{ ranger_yarn_release }}" dest: "{{ ranger_yarn_install_dir }}" state: link diff --git a/roles/yarn/resourcemanager/tasks/capacity_scheduler.yml b/roles/yarn/resourcemanager/tasks/capacity_scheduler.yml index da196b31..ac84d94c 100644 --- a/roles/yarn/resourcemanager/tasks/capacity_scheduler.yml +++ b/roles/yarn/resourcemanager/tasks/capacity_scheduler.yml @@ -3,7 +3,7 @@ --- - name: Render capacity-scheduler.xml - template: + ansible.builtin.template: src: capacity-scheduler.xml.j2 dest: '{{ hadoop_rm_conf_dir }}/capacity-scheduler.xml' owner: root @@ -11,6 +11,6 @@ mode: "644" - name: Restart YARN Resource Manager - service: + ansible.builtin.service: name: hadoop-yarn-resourcemanager state: restarted diff --git a/roles/yarn/resourcemanager/tasks/config.yml b/roles/yarn/resourcemanager/tasks/config.yml index ddf7b492..5d79c733 100644 --- a/roles/yarn/resourcemanager/tasks/config.yml +++ b/roles/yarn/resourcemanager/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ hadoop_rm_conf_dir }}/" dest: "{{ hadoop_rm_conf_dir }}.{{ ansible_date_time.epoch }}" owner: root @@ -14,7 +14,7 @@ - backup - name: Template hadoop-env.sh - template: + ansible.builtin.template: src: hadoop-env.sh.j2 dest: "{{ hadoop_rm_conf_dir }}/hadoop-env.sh" owner: root @@ -25,7 +25,7 @@ hadoop_conf_dir: "{{ hadoop_rm_conf_dir }}" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ hadoop_rm_conf_dir }}/log4j.properties" owner: root @@ -34,7 +34,7 @@ - name: Render core-site.xml - template: + ansible.builtin.template: src: core-site.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/core-site.xml" owner: root @@ -42,7 +42,7 @@ mode: "644" - name: Copy hdfs-site.xml - copy: + ansible.builtin.copy: src: /etc/hadoop/conf/hdfs-site.xml dest: "{{ hadoop_rm_conf_dir }}/hdfs-site.xml" remote_src: true @@ -51,7 +51,7 @@ mode: "644" - name: Render yarn-site.xml - template: + ansible.builtin.template: src: yarn-site.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/yarn-site.xml" owner: root @@ -59,7 +59,7 @@ mode: "644" - name: Render mapred-site.xml - template: + ansible.builtin.template: src: mapred-site.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/mapred-site.xml" owner: root @@ -67,7 +67,7 @@ mode: "644" - name: Render capacity-scheduler.xml - template: + ansible.builtin.template: src: capacity-scheduler.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/capacity-scheduler.xml" owner: root @@ -75,7 +75,7 @@ mode: "644" - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ hadoop_rm_conf_dir }}/jmxremote.password" owner: root @@ -83,7 +83,7 @@ mode: "644" - name: Render yarn.exclude file - template: + ansible.builtin.template: src: yarn.exclude.j2 dest: "{{ yarn_site['yarn.resourcemanager.nodes.exclude-path'] }}" owner: root diff --git a/roles/yarn/resourcemanager/tasks/install.yml b/roles/yarn/resourcemanager/tasks/install.yml index 348cce2e..80d29631 100644 --- a/roles/yarn/resourcemanager/tasks/install.yml +++ b/roles/yarn/resourcemanager/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure common yarn installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.yarn.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ hadoop_rm_conf_dir }}" state: directory owner: root @@ -16,7 +16,7 @@ mode: "755" - name: Template YARN ResourceManager service file - template: + ansible.builtin.template: src: hadoop-yarn-resourcemanager.service.j2 dest: /usr/lib/systemd/system/hadoop-yarn-resourcemanager.service owner: root diff --git a/roles/yarn/resourcemanager/tasks/jmx-exporter.yml b/roles/yarn/resourcemanager/tasks/jmx-exporter.yml index 20ada6a6..d0550ea0 100644 --- a/roles/yarn/resourcemanager/tasks/jmx-exporter.yml +++ b/roles/yarn/resourcemanager/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory owner: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/rm.yml" owner: root diff --git a/roles/yarn/resourcemanager/tasks/kerberos.yml b/roles/yarn/resourcemanager/tasks/kerberos.yml index eb9c0e6c..a4939518 100644 --- a/roles/yarn/resourcemanager/tasks/kerberos.yml +++ b/roles/yarn/resourcemanager/tasks/kerberos.yml @@ -3,17 +3,17 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure common hadoop kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.hadoop.common tasks_from: kerberos - name: Template krb5 jaas - template: + ansible.builtin.template: src: krb5JAASrm.conf.j2 dest: "{{ hadoop_rm_conf_dir }}/krb5JAASrm.conf" owner: root @@ -22,7 +22,7 @@ - block: - name: Ensure yarn rm user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -33,7 +33,7 @@ mode: "0600" - name: Ensure HTTP spnego's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -47,7 +47,7 @@ - name: YARN RM keytabs check block: - name: Ensure yarn rm user's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -58,7 +58,7 @@ mode: "0600" - name: Ensure HTTP spnego's keytab is working - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: diff --git a/roles/yarn/resourcemanager/tasks/restart.yml b/roles/yarn/resourcemanager/tasks/restart.yml index 513d8173..e9ba02ee 100644 --- a/roles/yarn/resourcemanager/tasks/restart.yml +++ b/roles/yarn/resourcemanager/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart YARN Resource Manager - service: + ansible.builtin.service: name: hadoop-yarn-resourcemanager state: restarted enabled: "{{ yarn_rm_start_on_boot }}" diff --git a/roles/yarn/resourcemanager/tasks/ssl-tls.yml b/roles/yarn/resourcemanager/tasks/ssl-tls.yml index b97a5a63..76218c5e 100644 --- a/roles/yarn/resourcemanager/tasks/ssl-tls.yml +++ b/roles/yarn/resourcemanager/tasks/ssl-tls.yml @@ -3,7 +3,7 @@ --- - name: Render ssl-server.xml - template: + ansible.builtin.template: src: ssl-server.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/ssl-server.xml" owner: root @@ -11,7 +11,7 @@ mode: "644" - name: Render ssl-client.xml - template: + ansible.builtin.template: src: ssl-client.xml.j2 dest: "{{ hadoop_rm_conf_dir }}/ssl-client.xml" owner: root @@ -19,7 +19,7 @@ mode: "644" - name: Create hadoop credentials store - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.jceks tasks_from: local vars: @@ -29,7 +29,7 @@ properties: "{{ hadoop_credentials_properties }}" - name: Ensure yarn keystore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_keystore vars: @@ -37,7 +37,7 @@ keystore_password: "{{ hadoop_keystore_password }}" - name: Ensure yarn truststore exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: create_truststore vars: @@ -45,7 +45,7 @@ truststore_password: "{{ hadoop_truststore_password }}" - name: Ensure yarn truststore is valid - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.ssl_tls tasks_from: verify_truststore vars: diff --git a/roles/yarn/resourcemanager/tasks/start.yml b/roles/yarn/resourcemanager/tasks/start.yml index 90af2cbf..26150d1c 100644 --- a/roles/yarn/resourcemanager/tasks/start.yml +++ b/roles/yarn/resourcemanager/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start YARN resource managers - service: + ansible.builtin.service: name: hadoop-yarn-resourcemanager state: started enabled: "{{ yarn_rm_start_on_boot }}" diff --git a/roles/yarn/resourcemanager/tasks/status.yml b/roles/yarn/resourcemanager/tasks/status.yml index ba47eb23..042baccc 100644 --- a/roles/yarn/resourcemanager/tasks/status.yml +++ b/roles/yarn/resourcemanager/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: Assert hadoop-yarn-resourcemanager is running - assert: + ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-resourcemanager.service'].state == "running" quiet: true diff --git a/roles/yarn/resourcemanager/tasks/stop.yml b/roles/yarn/resourcemanager/tasks/stop.yml index dd5ac71f..6dd98704 100644 --- a/roles/yarn/resourcemanager/tasks/stop.yml +++ b/roles/yarn/resourcemanager/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop YARN resource managers - service: + ansible.builtin.service: name: hadoop-yarn-resourcemanager state: stopped enabled: "{{ yarn_rm_start_on_boot }}" diff --git a/roles/zookeeper/check/tasks/main.yml b/roles/zookeeper/check/tasks/main.yml index d58c7ad6..2aad1b95 100644 --- a/roles/zookeeper/check/tasks/main.yml +++ b/roles/zookeeper/check/tasks/main.yml @@ -7,7 +7,7 @@ become_user: "{{ zookeeper_user }}" block: - name: ZK service check - Check create znode - shell: | + ansible.builtin.shell: | {{ zookeeper_cli_cmd_script }} << EOF create {{ zookeeper_check_znode }} "check-create-znode-data" quit @@ -16,7 +16,7 @@ changed_when: false failed_when: '("Created " + zookeeper_check_znode) not in zk_create_znode.stderr' - name: ZK service check - Check remove znode - shell: | + ansible.builtin.shell: | {{ zookeeper_cli_cmd_script }} << EOF {{ 'rmr' if zookeeper_version is version('3.5', '<') else 'deleteall' }} {{ zookeeper_check_znode }} get {{ zookeeper_check_znode }} @@ -29,7 +29,7 @@ and ("KeeperErrorCode = NoNode for " + zookeeper_check_znode) not in zk_remove_znode.stderr always: - name: ZK service check - Clean znode - shell: | + ansible.builtin.shell: | {{ zookeeper_cli_cmd_script }} << EOF {{ 'rmr' if zookeeper_version is version('3.5', '<') else 'deleteall' }} {{ zookeeper_check_znode }} quit @@ -42,10 +42,10 @@ become_user: "{{ zookeeper_user }}" block: - name: ZK service check - Fetch server mode - shell: /usr/bin/echo srvr | /usr/bin/nc {{ item }} {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="Mode:" {print $2}' + ansible.builtin.shell: /usr/bin/echo srvr | /usr/bin/nc {{ item }} {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="Mode:" {print $2}' register: zk_server_mode changed_when: false loop: "{{ groups['zk'] }}" - name: ZK service check - Failed if number of leaders is not 1 - assert: + ansible.builtin.assert: that: "{{ zk_server_mode.results | selectattr('stdout', 'in', 'leader') | list | length == 1 }}" diff --git a/roles/zookeeper/client/tasks/config.yml b/roles/zookeeper/client/tasks/config.yml index 55c13443..96c52b53 100644 --- a/roles/zookeeper/client/tasks/config.yml +++ b/roles/zookeeper/client/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ zookeeper_client_conf_dir }}/" dest: "{{ zookeeper_client_conf_dir }}.{{ ansible_date_time.epoch }}" group: root @@ -14,7 +14,7 @@ - backup - name: Template zoo.cfg - template: + ansible.builtin.template: src: zoo.cfg.j2 dest: "{{ zookeeper_client_conf_dir }}/zoo.cfg" group: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ zookeeper_client_conf_dir }}/log4j.properties" group: root @@ -30,7 +30,7 @@ mode: "644" - name: Template java.env - template: + ansible.builtin.template: src: java.env.client.j2 dest: "{{ zookeeper_client_conf_dir }}/java.env" group: root diff --git a/roles/zookeeper/client/tasks/install.yml b/roles/zookeeper/client/tasks/install.yml index c493ebe9..4405c29b 100644 --- a/roles/zookeeper/client/tasks/install.yml +++ b/roles/zookeeper/client/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure zookeeper common installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ zookeeper_client_conf_dir }}" state: directory group: root @@ -16,7 +16,7 @@ mode: "755" - name: Render {{ zookeeper_cli_cmd_script }} command - template: + ansible.builtin.template: src: zkCli.sh-command.j2 dest: "{{ zookeeper_cli_cmd_script }}" owner: root diff --git a/roles/zookeeper/client/tasks/kerberos.yml b/roles/zookeeper/client/tasks/kerberos.yml index 32c6d61c..fc8616da 100644 --- a/roles/zookeeper/client/tasks/kerberos.yml +++ b/roles/zookeeper/client/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure zookeeper user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Check zookeeper user's keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -32,7 +32,7 @@ when: not krb_create_principals_keytabs - name: Template jaas.conf - template: + ansible.builtin.template: src: jaas.client.conf.j2 dest: "{{ zookeeper_client_conf_dir }}/jaas.conf" owner: root diff --git a/roles/zookeeper/common/tasks/install.yml b/roles/zookeeper/common/tasks/install.yml index 998493ad..7f298040 100644 --- a/roles/zookeeper/common/tasks/install.yml +++ b/roles/zookeeper/common/tasks/install.yml @@ -3,20 +3,20 @@ --- - name: Ensure hadoop group exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.group vars: group: "{{ hadoop_group }}" - name: Ensure zookeeper user exists - include_role: + ansible.builtin.include_role: name: tosit.tdp.utils.user vars: user: "{{ zookeeper_user }}" group: "{{ hadoop_group }}" - name: Upload {{ zookeeper_dist_file }} - copy: + ansible.builtin.copy: src: "{{ binaries_local_dir }}/{{ zookeeper_dist_file }}" dest: "{{ binaries_upload_dir }}" group: root @@ -25,7 +25,7 @@ diff: false - name: Ensure {{ hadoop_root_dir }} exists - file: + ansible.builtin.file: path: "{{ hadoop_root_dir }}" state: directory group: root @@ -33,7 +33,7 @@ mode: "755" - name: Extract {{ zookeeper_dist_file }} - unarchive: + ansible.builtin.unarchive: src: "{{ binaries_upload_dir }}/{{ zookeeper_dist_file }}" dest: "{{ hadoop_root_dir }}" group: root @@ -43,7 +43,7 @@ creates: "{{ hadoop_root_dir }}/{{ zookeeper_dist_release }}" - name: Ensure {{ zookeeper_dist_file }} permissions are correct - file: + ansible.builtin.file: path: "{{ hadoop_root_dir }}/{{ zookeeper_dist_release }}" state: directory group: root @@ -51,13 +51,13 @@ mode: "755" - name: Create symbolic link to Zookeeper installation - file: + ansible.builtin.file: src: "{{ hadoop_root_dir }}/{{ zookeeper_dist_release }}" dest: "{{ zookeeper_install_dir }}" state: link - name: Create log directory - file: + ansible.builtin.file: path: "{{ zookeeper_log_dir }}" state: directory group: "{{ hadoop_group }}" diff --git a/roles/zookeeper/server/tasks/check.yml b/roles/zookeeper/server/tasks/check.yml index 51571a2a..858a65dc 100644 --- a/roles/zookeeper/server/tasks/check.yml +++ b/roles/zookeeper/server/tasks/check.yml @@ -3,7 +3,7 @@ --- - name: ZK server component check - Check ZK systemd - service_facts: + ansible.builtin.service_facts: register: zk_systemd_res retries: "{{ zookeeper_check_retries }}" delay: "{{ zookeeper_check_delay }}" @@ -11,7 +11,7 @@ failed_when: zk_systemd_res.ansible_facts.services["zookeeper.service"].state != 'running' - name: ZK server component check - Check ZK port - shell: /usr/bin/ncat -nzv 127.0.0.1 {{ zookeeper_server_client_port }} + ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 {{ zookeeper_server_client_port }} register: zk_port_res retries: "{{ zookeeper_check_retries }}" delay: "{{ zookeeper_check_delay }}" @@ -22,7 +22,7 @@ failed_when: 'zk_port_res.rc != 0 or zookeeper_check_port_str not in zk_port_res.stderr' - name: ZK server component check - Check ZK "ruok" - shell: /usr/bin/echo ruok | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} + ansible.builtin.shell: /usr/bin/echo ruok | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} register: zk_ruok_res retries: "{{ zookeeper_check_retries }}" delay: "{{ zookeeper_check_delay }}" @@ -33,7 +33,7 @@ failed_when: 'zk_ruok_res.rc != 0 or "imok" not in zk_ruok_res.stdout' - name: ZK server component check - Check ZK server state - shell: /usr/bin/echo mntr | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="zk_server_state" {print $2}' + ansible.builtin.shell: /usr/bin/echo mntr | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="zk_server_state" {print $2}' register: zk_svr_state_res retries: "{{ zookeeper_check_retries }}" delay: "{{ zookeeper_check_delay }}" @@ -44,7 +44,7 @@ failed_when: 'zk_svr_state_res.rc != 0 or ("follower" not in zk_svr_state_res.stdout and "leader" not in zk_svr_state_res.stdout)' - name: ZK server component check - Check ZK synced followers - shell: /usr/bin/echo mntr | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="zk_synced_followers" {print $2}' + ansible.builtin.shell: /usr/bin/echo mntr | /usr/bin/ncat 127.0.0.1 {{ zookeeper_server_client_port }} | /usr/bin/awk '$1=="zk_synced_followers" {print $2}' register: zk_sync_follow_res when: '"leader" in zk_svr_state_res.stdout' retries: "{{ zookeeper_check_retries }}" diff --git a/roles/zookeeper/server/tasks/config.yml b/roles/zookeeper/server/tasks/config.yml index 404908bf..b87c8c70 100644 --- a/roles/zookeeper/server/tasks/config.yml +++ b/roles/zookeeper/server/tasks/config.yml @@ -3,7 +3,7 @@ --- - name: Backup configuration - copy: + ansible.builtin.copy: src: "{{ zookeeper_server_conf_dir }}/" dest: "{{ zookeeper_server_conf_dir }}.{{ ansible_date_time.epoch }}" group: "{{ hadoop_group }}" @@ -14,7 +14,7 @@ - backup - name: Template zoo.cfg - template: + ansible.builtin.template: src: zoo.cfg.j2 dest: "{{ zookeeper_server_conf_dir }}/zoo.cfg" group: root @@ -22,7 +22,7 @@ mode: "644" - name: Template log4j.properties - template: + ansible.builtin.template: src: log4j.properties.j2 dest: "{{ zookeeper_server_conf_dir }}/log4j.properties" group: root @@ -30,7 +30,7 @@ mode: "644" - name: Template java.env - template: + ansible.builtin.template: src: java.env.server.j2 dest: "{{ zookeeper_server_conf_dir }}/java.env" group: root @@ -39,7 +39,7 @@ - name: Template zookeeper-env.sh - template: + ansible.builtin.template: src: zookeeper-env.sh.j2 dest: "{{ zookeeper_server_conf_dir }}/zookeeper-env.sh" group: root @@ -48,7 +48,7 @@ - name: Render jmxremote.password - template: + ansible.builtin.template: src: jmxremote.password.j2 dest: "{{ zookeeper_server_conf_dir }}/jmxremote.password" group: root diff --git a/roles/zookeeper/server/tasks/install.yml b/roles/zookeeper/server/tasks/install.yml index 696be8ea..838cb3df 100644 --- a/roles/zookeeper/server/tasks/install.yml +++ b/roles/zookeeper/server/tasks/install.yml @@ -3,12 +3,12 @@ --- - name: Ensure zookeeper common installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.zookeeper.common tasks_from: install - name: Create configuration directory - file: + ansible.builtin.file: path: "{{ zookeeper_server_conf_dir }}" state: directory group: root @@ -16,7 +16,7 @@ mode: "755" - name: Create zookeeper data directory - file: + ansible.builtin.file: path: "{{ zookeeper_server_data_dirs }}" state: directory owner: "{{ zookeeper_user }}" @@ -24,7 +24,7 @@ mode: "750" - name: Get an ID for host - set_fact: + ansible.builtin.set_fact: zk_id: "{{ id + 1 }}" loop: "{{ groups['zk'] }}" when: inventory_hostname == item @@ -32,7 +32,7 @@ index_var: id - name: Add myid file - copy: + ansible.builtin.copy: dest: "{{ zookeeper_server_data_dirs }}/myid" content: "{{ zk_id }}" owner: "{{ zookeeper_user }}" @@ -40,7 +40,7 @@ mode: "750" - name: Template Zookeeper service file - template: + ansible.builtin.template: src: zookeeper.service.j2 dest: "/usr/lib/systemd/system/{{ zookeeper_server_service_name }}.service" owner: root diff --git a/roles/zookeeper/server/tasks/jmx-exporter.yml b/roles/zookeeper/server/tasks/jmx-exporter.yml index 1a3c415b..2d0df63d 100644 --- a/roles/zookeeper/server/tasks/jmx-exporter.yml +++ b/roles/zookeeper/server/tasks/jmx-exporter.yml @@ -3,7 +3,7 @@ --- - name: Ensure configuration directory - file: + ansible.builtin.file: path: "{{ jmx_exporter_conf_dir }}" state: directory group: root @@ -11,7 +11,7 @@ mode: "755" - name: Render jmx-exporter config file jmx-exporter.yml - copy: + ansible.builtin.copy: content: "{{ jmx_exporter | to_nice_yaml }}" dest: "{{ jmx_exporter_conf_dir }}/{{ jmx_exporter_zk_file }}" group: root diff --git a/roles/zookeeper/server/tasks/kerberos.yml b/roles/zookeeper/server/tasks/kerberos.yml index 11949afd..9b8a311b 100644 --- a/roles/zookeeper/server/tasks/kerberos.yml +++ b/roles/zookeeper/server/tasks/kerberos.yml @@ -3,12 +3,12 @@ --- - name: Ensure common kerberos installation tasks are performed - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: install - name: Ensure zookeeper user's principal and keytab exist - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: create_principal_keytab vars: @@ -20,7 +20,7 @@ when: krb_create_principals_keytabs - name: Check zookeeper user's keytab works - import_role: + ansible.builtin.import_role: name: tosit.tdp.utils.kerberos tasks_from: check_secure_keytab vars: @@ -32,7 +32,7 @@ when: not krb_create_principals_keytabs - name: Template jaas.conf - template: + ansible.builtin.template: src: jaas.server.conf.j2 dest: "{{ zookeeper_server_conf_dir }}/jaas.conf" owner: root diff --git a/roles/zookeeper/server/tasks/restart.yml b/roles/zookeeper/server/tasks/restart.yml index ccea8e34..bb937da6 100644 --- a/roles/zookeeper/server/tasks/restart.yml +++ b/roles/zookeeper/server/tasks/restart.yml @@ -3,7 +3,7 @@ --- - name: Restart Zookeeper - service: + ansible.builtin.service: name: "{{ zookeeper_server_service_name }}" state: restarted enabled: "{{ zk_start_on_boot }}" diff --git a/roles/zookeeper/server/tasks/start.yml b/roles/zookeeper/server/tasks/start.yml index a88379c9..ccc4f19d 100644 --- a/roles/zookeeper/server/tasks/start.yml +++ b/roles/zookeeper/server/tasks/start.yml @@ -3,7 +3,7 @@ --- - name: Start Zookeeper - service: + ansible.builtin.service: name: "{{ zookeeper_server_service_name }}" state: started enabled: "{{ zk_start_on_boot }}" diff --git a/roles/zookeeper/server/tasks/status.yml b/roles/zookeeper/server/tasks/status.yml index 999de4ca..299995cc 100644 --- a/roles/zookeeper/server/tasks/status.yml +++ b/roles/zookeeper/server/tasks/status.yml @@ -3,10 +3,10 @@ --- - name: Populate service facts - service_facts: + ansible.builtin.service_facts: - name: "Assert {{ zookeeper_server_service_name }} is running" - assert: + ansible.builtin.assert: that: - ansible_facts.services['{{ zookeeper_server_service_name }}.service'].state == "running" quiet: true diff --git a/roles/zookeeper/server/tasks/stop.yml b/roles/zookeeper/server/tasks/stop.yml index 471efaf9..a04cc798 100644 --- a/roles/zookeeper/server/tasks/stop.yml +++ b/roles/zookeeper/server/tasks/stop.yml @@ -3,7 +3,7 @@ --- - name: Stop Zookeeper - service: + ansible.builtin.service: name: "{{ zookeeper_server_service_name }}" state: stopped enabled: "{{ zk_start_on_boot }}" From 44674444a51e28cad3399503a8e544f6e260f8c2 Mon Sep 17 00:00:00 2001 From: Romain Pignolet Date: Mon, 10 Jul 2023 01:19:17 +0200 Subject: [PATCH 17/20] refactor(ansible-lint): update ansible-lint version and configuration --- .ansible-lint | 31 +++++--- dev/requirements.txt | 6 +- playbooks/hdfs_audit_init.yml | 2 +- roles/common/handlers/main.yml | 2 +- roles/hbase/master/tasks/install.yml | 2 +- roles/hbase/master/tasks/status.yml | 2 +- .../queryserver/daemon/tasks/install.yml | 2 +- .../queryserver/daemon/tasks/kerberos.yml | 6 +- .../queryserver/daemon/tasks/status.yml | 2 +- roles/hbase/regionserver/tasks/install.yml | 2 +- roles/hbase/regionserver/tasks/status.yml | 2 +- roles/hbase/rest/tasks/install.yml | 2 +- roles/hbase/rest/tasks/kerberos.yml | 4 +- roles/hbase/rest/tasks/status.yml | 2 +- roles/hdfs/check/tasks/main.yml | 70 +++++++++---------- roles/hdfs/common/tasks/hdfs_audit_init.yml | 1 - roles/hdfs/datanode/tasks/check.yml | 4 +- roles/hdfs/datanode/tasks/install.yml | 2 +- roles/hdfs/datanode/tasks/kerberos.yml | 4 +- roles/hdfs/datanode/tasks/status.yml | 2 +- roles/hdfs/httpfs/tasks/kerberos.yml | 8 +-- roles/hdfs/httpfs/tasks/status.yml | 2 +- roles/hdfs/journalnode/tasks/check.yml | 4 +- roles/hdfs/journalnode/tasks/install.yml | 2 +- roles/hdfs/journalnode/tasks/kerberos.yml | 4 +- roles/hdfs/journalnode/tasks/status.yml | 2 +- roles/hdfs/namenode/tasks/check.yml | 58 +++++++-------- roles/hdfs/namenode/tasks/install.yml | 7 +- roles/hdfs/namenode/tasks/kerberos.yml | 4 +- roles/hdfs/namenode/tasks/status.yml | 4 +- roles/hive/hiveserver2/tasks/install.yml | 2 +- roles/hive/hiveserver2/tasks/kerberos.yml | 6 +- roles/hive/hiveserver2/tasks/status.yml | 2 +- roles/hive/metastore/tasks/install.yml | 2 +- roles/hive/metastore/tasks/status.yml | 2 +- roles/knox/gateway/tasks/install.yml | 4 +- roles/knox/gateway/tasks/status.yml | 2 +- roles/knox/ranger/tasks/init.yml | 2 +- roles/ranger/admin/tasks/install.yml | 2 +- roles/ranger/admin/tasks/kerberos.yml | 6 +- roles/ranger/admin/tasks/status.yml | 2 +- roles/ranger/kms/tasks/install.yml | 2 +- roles/ranger/kms/tasks/kerberos.yml | 4 +- roles/ranger/kms/tasks/status.yml | 2 +- roles/ranger/solr/tasks/install.yml | 2 +- roles/ranger/solr/tasks/status.yml | 2 +- roles/ranger/usersync/tasks/install.yml | 2 +- roles/ranger/usersync/tasks/status.yml | 2 +- roles/spark/historyserver/tasks/install.yml | 2 +- roles/spark/historyserver/tasks/kerberos.yml | 4 +- roles/utils/kerberos/tasks/install.yml | 2 +- .../yarn/apptimelineserver/tasks/install.yml | 2 +- .../yarn/apptimelineserver/tasks/kerberos.yml | 4 +- roles/yarn/apptimelineserver/tasks/status.yml | 2 +- roles/yarn/jobhistoryserver/tasks/install.yml | 2 +- .../yarn/jobhistoryserver/tasks/kerberos.yml | 4 +- roles/yarn/jobhistoryserver/tasks/status.yml | 2 +- roles/yarn/nodemanager/tasks/install.yml | 6 +- roles/yarn/nodemanager/tasks/kerberos.yml | 4 +- roles/yarn/nodemanager/tasks/status.yml | 2 +- roles/yarn/resourcemanager/tasks/install.yml | 2 +- roles/yarn/resourcemanager/tasks/kerberos.yml | 6 +- roles/yarn/resourcemanager/tasks/status.yml | 2 +- roles/zookeeper/server/tasks/check.yml | 2 +- roles/zookeeper/server/tasks/install.yml | 2 +- roles/zookeeper/server/tasks/status.yml | 2 +- 66 files changed, 182 insertions(+), 163 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index f672c8b1..536c1bc5 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,11 +1,26 @@ +exclude_paths: + - .github/ + - dev/ + - docs/ + - tdp_lib_dag/ + - tdp_vars_defaults/ + - tdp_vars_schema/ + warn_list: # or 'skip_list' to silence them completely -- command-instead-of-shell # Use shell only when shell functionality is required -- deprecated-command-syntax # Using command rather than an argument to e.g. file -- experimental # all rules tagged as experimental -- no-changed-when # Commands should not change things if nothing needs doing -- risky-shell-pipe # Shells that use pipes should set the pipefail option -- yaml # Violations reported by yamllint + - experimental # all rules tagged as experimental + - name[missing] # All tasks should be named + - no-changed-when # Commands should not change things if nothing needs doing + - risky-shell-pipe # Shells that use pipes should set the pipefail option skip_list: -- fqcn[action-core] -- name[template] + - command-instead-of-module # used in place of module + - galaxy[no-changelog] # No changelog found. Please add a changelog file. Refer to the galaxy.md file for more info + - galaxy[no-runtime] # meta/runtime.yml file not found + - galaxy[tags] # galaxy.yaml must have one of the required tags: ['application', 'cloud', 'database', 'infrastructure', 'linux', 'monitoring', 'networking', 'security', 'storage', 'tools', 'windows'] + - galaxy[version-incorrect] # collection version should be greater than or equal to 1.0.0 + - ignore-errors # Use failed_when and specify error conditions instead of using ignore_errors + - name[casing] # All names should start with an uppercase letter + - name[play] # All plays should be named + - name[template] # Jinja templates should only be at the end of 'name' + - var-naming[no-role-prefix] # Variables names from within roles should use role_name_ as a prefix. + - yaml[line-length] # Line too long (> 160 characters) diff --git a/dev/requirements.txt b/dev/requirements.txt index 035592be..f7793aaa 100644 --- a/dev/requirements.txt +++ b/dev/requirements.txt @@ -1,3 +1,3 @@ -ansible-lint==5.4.0 -ansible==2.9.27 -jsonschema==3.2.0 +ansible-lint==6.17.2 +ansible-core==2.15.1 +jsonschema==4.18.0 diff --git a/playbooks/hdfs_audit_init.yml b/playbooks/hdfs_audit_init.yml index 06a8390a..73dbf36f 100644 --- a/playbooks/hdfs_audit_init.yml +++ b/playbooks/hdfs_audit_init.yml @@ -4,7 +4,7 @@ --- - name: HDFS audit init hosts: hadoop_client - strategy: linear + strategy: linear tasks: - tosit.tdp.resolve: # noqa unnamed-task node_name: hdfs_audit_init diff --git a/roles/common/handlers/main.yml b/roles/common/handlers/main.yml index fc409e81..6de0dcd1 100644 --- a/roles/common/handlers/main.yml +++ b/roles/common/handlers/main.yml @@ -4,4 +4,4 @@ --- - name: systemctl daemon-reload ansible.builtin.systemd: - daemon_reload: yes + daemon_reload: true diff --git a/roles/hbase/master/tasks/install.yml b/roles/hbase/master/tasks/install.yml index 4a9cebe0..309ce1b3 100644 --- a/roles/hbase/master/tasks/install.yml +++ b/roles/hbase/master/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hbase/master/tasks/status.yml b/roles/hbase/master/tasks/status.yml index cb2c5a7a..b1475439 100644 --- a/roles/hbase/master/tasks/status.yml +++ b/roles/hbase/master/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hbase-master is running +- name: Assert hbase-master is running ansible.builtin.assert: that: - ansible_facts.services['hbase-master.service'].state == "running" diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml index f56a2af3..1b1e8453 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/install.yml @@ -39,4 +39,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml index 4e693629..92d0142b 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/kerberos.yml @@ -7,7 +7,8 @@ name: tosit.tdp.utils.kerberos tasks_from: install -- block: +- when: krb_create_principals_keytabs + block: - name: Ensure phoenix queryserver principal and keytab exist ansible.builtin.import_role: name: tosit.tdp.utils.kerberos @@ -29,9 +30,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: Phoenix QueryServer keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure phoenix queryserver keytab works ansible.builtin.import_role: @@ -54,4 +55,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml b/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml index 0217bee8..b7db77e3 100644 --- a/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml +++ b/roles/hbase/phoenix/queryserver/daemon/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert phoenix-queryserver is running +- name: Assert phoenix-queryserver is running ansible.builtin.assert: that: - ansible_facts.services['phoenix-queryserver.service'].state == "running" diff --git a/roles/hbase/regionserver/tasks/install.yml b/roles/hbase/regionserver/tasks/install.yml index 51202438..013d1462 100644 --- a/roles/hbase/regionserver/tasks/install.yml +++ b/roles/hbase/regionserver/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hbase/regionserver/tasks/status.yml b/roles/hbase/regionserver/tasks/status.yml index ad801797..c20e23ab 100644 --- a/roles/hbase/regionserver/tasks/status.yml +++ b/roles/hbase/regionserver/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hbase-regionserver is running +- name: Assert hbase-regionserver is running ansible.builtin.assert: that: - ansible_facts.services['hbase-regionserver.service'].state == "running" diff --git a/roles/hbase/rest/tasks/install.yml b/roles/hbase/rest/tasks/install.yml index 3cc62293..3a803c63 100644 --- a/roles/hbase/rest/tasks/install.yml +++ b/roles/hbase/rest/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hbase/rest/tasks/kerberos.yml b/roles/hbase/rest/tasks/kerberos.yml index bb3fb517..7b90337e 100644 --- a/roles/hbase/rest/tasks/kerberos.yml +++ b/roles/hbase/rest/tasks/kerberos.yml @@ -24,6 +24,7 @@ hbase_principal: "{{ hbase_rest_kerberos_principal }}" - name: HBase Rest keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure hbase principal and keytab exist ansible.builtin.import_role: @@ -46,9 +47,9 @@ user: "root" group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: HBase Rest keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure hbase keytab works ansible.builtin.import_role: @@ -71,4 +72,3 @@ user: "root" group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hbase/rest/tasks/status.yml b/roles/hbase/rest/tasks/status.yml index 29490363..2098c3d7 100644 --- a/roles/hbase/rest/tasks/status.yml +++ b/roles/hbase/rest/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hbase-rest is running +- name: Assert hbase-rest is running ansible.builtin.assert: that: - ansible_facts.services['hbase-rest.service'].state == "running" diff --git a/roles/hdfs/check/tasks/main.yml b/roles/hdfs/check/tasks/main.yml index 7d68c5af..742ce0ab 100644 --- a/roles/hdfs/check/tasks/main.yml +++ b/roles/hdfs/check/tasks/main.yml @@ -5,44 +5,44 @@ - name: HDFS service check - "kinit" run_once: true become_user: "{{ hdfs_user }}" - ansible.builtin.shell: /bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab "{{ hdfs_headless_principal }}@{{ realm }}" + ansible.builtin.command: /bin/kinit -kt /etc/security/keytabs/hdfs.headless.keytab "{{ hdfs_headless_principal }}@{{ realm }}" changed_when: false - name: HDFS service check - RPC check file with put/cat/get/delete & fsck run_once: true become_user: "{{ hdfs_user }}" block: - - name: HDFS service check - RPC check put file - ansible.builtin.shell: echo "HDFS Service Check" | hdfs dfs -put - {{ hdfs_check_path_file }} - register: hdfs_put_file - changed_when: false - failed_when: 'hdfs_put_file.rc != 0' - - name: HDFS service check - RPC check cat file - ansible.builtin.shell: hdfs dfs -cat {{ hdfs_check_path_file }} - register: hdfs_cat_file - changed_when: false - failed_when: 'hdfs_cat_file.rc != 0 or "HDFS Service Check" not in hdfs_cat_file.stdout' - - name: HDFS service check - RPC check get file - ansible.builtin.shell: | - hdfs dfs -get {{ hdfs_check_path_file }} {{ hdfs_check_path_file }} && - cat {{ hdfs_check_path_file }} && - rm {{ hdfs_check_path_file }} - register: hdfs_get_file - changed_when: false - failed_when: 'hdfs_get_file.rc != 0 or "HDFS Service Check" not in hdfs_get_file.stdout' - - name: HDFS service check - RPC check delete file - ansible.builtin.shell: hdfs dfs -rm "{{ hdfs_check_path_file }}" - register: hdfs_delete_file - changed_when: false - failed_when: 'hdfs_delete_file.rc != 0' - - name: HDFS service check - RPC check fsck - ansible.builtin.shell: hdfs fsck /tmp - register: hdfs_fsck - changed_when: false - failed_when: 'hdfs_fsck.rc != 0 or "Status: HEALTHY" not in hdfs_fsck.stdout' + - name: HDFS service check - RPC check put file + ansible.builtin.shell: echo "HDFS Service Check" | hdfs dfs -put - {{ hdfs_check_path_file }} + register: hdfs_put_file + changed_when: false + failed_when: 'hdfs_put_file.rc != 0' + - name: HDFS service check - RPC check cat file + ansible.builtin.command: hdfs dfs -cat {{ hdfs_check_path_file }} + register: hdfs_cat_file + changed_when: false + failed_when: 'hdfs_cat_file.rc != 0 or "HDFS Service Check" not in hdfs_cat_file.stdout' + - name: HDFS service check - RPC check get file + ansible.builtin.shell: | + hdfs dfs -get {{ hdfs_check_path_file }} {{ hdfs_check_path_file }} && + cat {{ hdfs_check_path_file }} && + rm {{ hdfs_check_path_file }} + register: hdfs_get_file + changed_when: false + failed_when: 'hdfs_get_file.rc != 0 or "HDFS Service Check" not in hdfs_get_file.stdout' + - name: HDFS service check - RPC check delete file + ansible.builtin.command: hdfs dfs -rm "{{ hdfs_check_path_file }}" + register: hdfs_delete_file + changed_when: false + failed_when: 'hdfs_delete_file.rc != 0' + - name: HDFS service check - RPC check fsck + ansible.builtin.command: hdfs fsck /tmp + register: hdfs_fsck + changed_when: false + failed_when: 'hdfs_fsck.rc != 0 or "Status: HEALTHY" not in hdfs_fsck.stdout' rescue: - name: HDFS service check - "kdestroy" - ansible.builtin.shell: /bin/kdestroy + ansible.builtin.command: /bin/kdestroy changed_when: false failed_when: true @@ -56,28 +56,28 @@ changed_when: false failed_when: 'webhdfs_nn_host.rc != 0 or webhdfs_nn_host.stdout == ""' - name: HDFS service check - WebHDFS check create file - ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X PUT --data-binary "HDFS Service Check" "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=CREATE" + ansible.builtin.command: curl -i -k -L --negotiate -u ":" -X PUT --data-binary "HDFS Service Check" "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=CREATE" register: webhdfs_create_file changed_when: false failed_when: 'webhdfs_create_file.rc != 0 or "HTTP/1.1 201 Created" not in webhdfs_create_file.stdout' - name: HDFS service check - WebHDFS check read file - ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X GET "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=OPEN" + ansible.builtin.command: curl -i -k -L --negotiate -u ":" -X GET "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=OPEN" register: webhdfs_read_file changed_when: false failed_when: 'webhdfs_read_file.rc != 0 or ("HTTP/1.1 200 OK" not in webhdfs_read_file.stdout and "HDFS Service Check" not in webhdfs_read_file.stdout)' - name: HDFS service check - WebHDFS check delete file - ansible.builtin.shell: curl -i -k -L --negotiate -u ":" -X DELETE "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=DELETE" + ansible.builtin.command: curl -i -k -L --negotiate -u ":" -X DELETE "https://{{ webhdfs_nn_host.stdout }}:{{ hdfs_nn_https_port | string }}/webhdfs/v1{{ hdfs_check_path_file }}?op=DELETE" register: webhdfs_delete_file changed_when: false failed_when: webhdfs_delete_file.rc != 0 or ("HTTP/1.1 200 OK" not in webhdfs_delete_file.stdout and "\{\"boolean\":true\}" not in webhdfs_delete_file.stdout) rescue: - name: HDFS service check - "kdestroy" - ansible.builtin.shell: /bin/kdestroy + ansible.builtin.command: /bin/kdestroy changed_when: false failed_when: true - name: HDFS service check - "kdestroy" run_once: true become_user: "{{ hdfs_user }}" - ansible.builtin.shell: /bin/kdestroy + ansible.builtin.command: /bin/kdestroy changed_when: false diff --git a/roles/hdfs/common/tasks/hdfs_audit_init.yml b/roles/hdfs/common/tasks/hdfs_audit_init.yml index f10d8aa1..4478249d 100644 --- a/roles/hdfs/common/tasks/hdfs_audit_init.yml +++ b/roles/hdfs/common/tasks/hdfs_audit_init.yml @@ -22,4 +22,3 @@ owner: "{{ hdfs_user }}" group: "{{ hdfs_user }}" mode: "700" - diff --git a/roles/hdfs/datanode/tasks/check.yml b/roles/hdfs/datanode/tasks/check.yml index 74b5f7bb..2e574188 100644 --- a/roles/hdfs/datanode/tasks/check.yml +++ b/roles/hdfs/datanode/tasks/check.yml @@ -11,7 +11,7 @@ failed_when: dn_systemd_res.ansible_facts.services["hadoop-hdfs-datanode.service"].state != 'running' - name: HDFS datanode component check - Check datanode data port - ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_data_port }}" + ansible.builtin.command: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_data_port }}" register: dn_data_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -22,7 +22,7 @@ failed_when: 'dn_data_port_res.rc != 0 or hdfs_check_port_str not in dn_data_port_res.stderr' - name: HDFS datanode component check - Check datanode https port - ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_https_port }}" + ansible.builtin.command: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_dn_https_port }}" register: dn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" diff --git a/roles/hdfs/datanode/tasks/install.yml b/roles/hdfs/datanode/tasks/install.yml index 732b2d94..bc640448 100644 --- a/roles/hdfs/datanode/tasks/install.yml +++ b/roles/hdfs/datanode/tasks/install.yml @@ -41,4 +41,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hdfs/datanode/tasks/kerberos.yml b/roles/hdfs/datanode/tasks/kerberos.yml index 0481db18..f5b8c56c 100644 --- a/roles/hdfs/datanode/tasks/kerberos.yml +++ b/roles/hdfs/datanode/tasks/kerberos.yml @@ -13,6 +13,7 @@ tasks_from: kerberos - name: HDFS Datanode keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure hdfs dn user's principal and keytab exist ansible.builtin.import_role: @@ -35,9 +36,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: HDFS Datanode keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure hdfs dn user's keytab is working ansible.builtin.import_role: @@ -60,4 +61,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hdfs/datanode/tasks/status.yml b/roles/hdfs/datanode/tasks/status.yml index f1330ac9..f3c834e2 100644 --- a/roles/hdfs/datanode/tasks/status.yml +++ b/roles/hdfs/datanode/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-hdfs-datanode is running +- name: Assert hadoop-hdfs-datanode is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-datanode.service'].state == "running" diff --git a/roles/hdfs/httpfs/tasks/kerberos.yml b/roles/hdfs/httpfs/tasks/kerberos.yml index 7372ccf2..58fc4bad 100644 --- a/roles/hdfs/httpfs/tasks/kerberos.yml +++ b/roles/hdfs/httpfs/tasks/kerberos.yml @@ -12,7 +12,8 @@ name: tosit.tdp.hadoop.common tasks_from: kerberos -- block: +- when: krb_create_principals_keytabs + block: - name: Ensure httpfs user's principal and keytab exist ansible.builtin.import_role: name: tosit.tdp.utils.kerberos @@ -34,9 +35,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs -- block: +- when: not krb_create_principals_keytabs + block: - name: Ensure httpfs user's keytab is working ansible.builtin.import_role: name: tosit.tdp.utils.kerberos @@ -58,4 +59,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hdfs/httpfs/tasks/status.yml b/roles/hdfs/httpfs/tasks/status.yml index 2deae213..74b2ab5c 100644 --- a/roles/hdfs/httpfs/tasks/status.yml +++ b/roles/hdfs/httpfs/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-hdfs-httpfs is running +- name: Assert hadoop-hdfs-httpfs is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-httpfs.service'].state == "running" diff --git a/roles/hdfs/journalnode/tasks/check.yml b/roles/hdfs/journalnode/tasks/check.yml index 25174cc4..58acc57e 100644 --- a/roles/hdfs/journalnode/tasks/check.yml +++ b/roles/hdfs/journalnode/tasks/check.yml @@ -11,7 +11,7 @@ failed_when: jn_systemd_res.ansible_facts.services["hadoop-hdfs-journalnode.service"].state != 'running' - name: HDFS journalnode component check - Check journalnode rpc port - ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_rpc_port }}" + ansible.builtin.command: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_rpc_port }}" register: jn_rpc_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -22,7 +22,7 @@ failed_when: 'jn_rpc_port_res.rc != 0 or hdfs_check_port_str not in jn_rpc_port_res.stderr' - name: HDFS journalnode component check - Check journalnode https port - ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_https_port }}" + ansible.builtin.command: /usr/bin/ncat -nzv 127.0.0.1 "{{ hdfs_jn_https_port }}" register: jn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" diff --git a/roles/hdfs/journalnode/tasks/install.yml b/roles/hdfs/journalnode/tasks/install.yml index b7047648..cad84c2b 100644 --- a/roles/hdfs/journalnode/tasks/install.yml +++ b/roles/hdfs/journalnode/tasks/install.yml @@ -31,4 +31,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hdfs/journalnode/tasks/kerberos.yml b/roles/hdfs/journalnode/tasks/kerberos.yml index 08716d15..013cc38e 100644 --- a/roles/hdfs/journalnode/tasks/kerberos.yml +++ b/roles/hdfs/journalnode/tasks/kerberos.yml @@ -8,6 +8,7 @@ tasks_from: install - name: HDFS JournalNode keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure hdfs jn user's principal and keytab exist ansible.builtin.import_role: @@ -30,9 +31,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: HDFS JournalNode keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure hdfs jn user's keytab is working ansible.builtin.import_role: @@ -55,4 +56,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hdfs/journalnode/tasks/status.yml b/roles/hdfs/journalnode/tasks/status.yml index 1965c5d5..87fd74bc 100644 --- a/roles/hdfs/journalnode/tasks/status.yml +++ b/roles/hdfs/journalnode/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-hdfs-journalnode is running +- name: Assert hadoop-hdfs-journalnode is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-journalnode.service'].state == "running" diff --git a/roles/hdfs/namenode/tasks/check.yml b/roles/hdfs/namenode/tasks/check.yml index af6ca44e..81605d99 100644 --- a/roles/hdfs/namenode/tasks/check.yml +++ b/roles/hdfs/namenode/tasks/check.yml @@ -19,7 +19,7 @@ failed_when: nn_zkfc_systemd_res.ansible_facts.services["hadoop-hdfs-zkfc.service"].state != 'running' - name: HDFS namenode component check - Check namenode rpc port - ansible.builtin.shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_rpc_port }}" + ansible.builtin.command: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_rpc_port }}" register: nn_rpc_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -30,7 +30,7 @@ failed_when: 'nn_rpc_port_res.rc != 0 or hdfs_check_port_str not in nn_rpc_port_res.stderr' - name: HDFS namenode component check - Check namenode https port - ansible.builtin.shell: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_https_port }}" + ansible.builtin.command: /usr/bin/ncat -zv "{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}" "{{ hdfs_nn_https_port }}" register: nn_https_port_res retries: "{{ hdfs_check_retries }}" delay: "{{ hdfs_check_delay }}" @@ -42,40 +42,40 @@ - name: HDFS namenode component check - "kinit" become_user: "{{ hdfs_user }}" - ansible.builtin.shell: /bin/kinit -kt /etc/security/keytabs/nn.service.keytab "nn/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }}" + ansible.builtin.command: /bin/kinit -kt /etc/security/keytabs/nn.service.keytab "nn/{{ ansible_hostname | tosit.tdp.access_fqdn(hostvars) }}@{{ realm }}" changed_when: false - name: HDFS namenode component check - Check namenode safemode & state become_user: "{{ hdfs_user }}" block: - - name: HDFS namenode component check - Check nn safemode - ansible.builtin.shell: hdfs dfsadmin -safemode get | grep "{{ ansible_hostname }}" - register: nn_safemode_res - retries: "{{ hdfs_check_retries }}" - delay: "{{ hdfs_check_delay }}" - changed_when: false - until: - - 'nn_safemode_res.rc == 0' - - '"Safe mode is OFF" in nn_safemode_res.stdout' - failed_when: 'nn_safemode_res.rc != 0 or "Safe mode is OFF" not in nn_safemode_res.stdout' - - name: HDFS namenode component check - Check nn state (active & standby) - ansible.builtin.shell: hdfs haadmin -getAllServiceState - register: nn_state_res - retries: "{{ hdfs_check_retries }}" - delay: "{{ hdfs_check_delay }}" - changed_when: false - until: - - 'nn_state_res.rc == 0' - - '"active" in nn_state_res.stdout' - - '"standby" in nn_state_res.stdout' - failed_when: 'nn_state_res.rc != 0 or "active" not in nn_state_res.stdout or "standby" not in nn_state_res.stdout' + - name: HDFS namenode component check - Check nn safemode + ansible.builtin.shell: hdfs dfsadmin -safemode get | grep "{{ ansible_hostname }}" + register: nn_safemode_res + retries: "{{ hdfs_check_retries }}" + delay: "{{ hdfs_check_delay }}" + changed_when: false + until: + - 'nn_safemode_res.rc == 0' + - '"Safe mode is OFF" in nn_safemode_res.stdout' + failed_when: 'nn_safemode_res.rc != 0 or "Safe mode is OFF" not in nn_safemode_res.stdout' + - name: HDFS namenode component check - Check nn state (active & standby) + ansible.builtin.command: hdfs haadmin -getAllServiceState + register: nn_state_res + retries: "{{ hdfs_check_retries }}" + delay: "{{ hdfs_check_delay }}" + changed_when: false + until: + - 'nn_state_res.rc == 0' + - '"active" in nn_state_res.stdout' + - '"standby" in nn_state_res.stdout' + failed_when: 'nn_state_res.rc != 0 or "active" not in nn_state_res.stdout or "standby" not in nn_state_res.stdout' rescue: - - name: HDFS namenode component check - "kdestroy" - ansible.builtin.shell: /bin/kdestroy - changed_when: false - failed_when: true + - name: HDFS namenode component check - "kdestroy" + ansible.builtin.command: /bin/kdestroy + changed_when: false + failed_when: true - name: HDFS namenode component check - "kdestroy" become_user: "{{ hdfs_user }}" - ansible.builtin.shell: /bin/kdestroy + ansible.builtin.command: /bin/kdestroy changed_when: false diff --git a/roles/hdfs/namenode/tasks/install.yml b/roles/hdfs/namenode/tasks/install.yml index 58a1f44e..44e3ea4d 100644 --- a/roles/hdfs/namenode/tasks/install.yml +++ b/roles/hdfs/namenode/tasks/install.yml @@ -13,6 +13,7 @@ state: directory group: '{{ hadoop_group }}' owner: '{{ hdfs_user }}' + mode: "755" - name: Create HDFS Namenode configuration directory ansible.builtin.file: @@ -20,10 +21,14 @@ state: directory group: '{{ hadoop_group }}' owner: '{{ hdfs_user }}' + mode: "755" - name: Template HDFS Namenode service file ansible.builtin.template: src: hadoop-hdfs-namenode.service.j2 dest: /usr/lib/systemd/system/hadoop-hdfs-namenode.service + owner: root + group: root + mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hdfs/namenode/tasks/kerberos.yml b/roles/hdfs/namenode/tasks/kerberos.yml index efc51991..4bc28816 100644 --- a/roles/hdfs/namenode/tasks/kerberos.yml +++ b/roles/hdfs/namenode/tasks/kerberos.yml @@ -21,6 +21,7 @@ mode: "644" - name: HDFS NameNode keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure hdfs nn user's principal and keytab exist ansible.builtin.import_role: @@ -43,9 +44,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: HDFS NameNode keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure hdfs nn user's keytab is working ansible.builtin.import_role: @@ -68,4 +69,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hdfs/namenode/tasks/status.yml b/roles/hdfs/namenode/tasks/status.yml index c3f354a5..1a869c0c 100644 --- a/roles/hdfs/namenode/tasks/status.yml +++ b/roles/hdfs/namenode/tasks/status.yml @@ -5,13 +5,13 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-hdfs-namenode is running +- name: Assert hadoop-hdfs-namenode is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-namenode.service'].state == "running" quiet: true -- name: Assert hadoop-hdfs-zkfc is running +- name: Assert hadoop-hdfs-zkfc is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-hdfs-zkfc.service'].state == "running" diff --git a/roles/hive/hiveserver2/tasks/install.yml b/roles/hive/hiveserver2/tasks/install.yml index f48ca152..7853fc72 100644 --- a/roles/hive/hiveserver2/tasks/install.yml +++ b/roles/hive/hiveserver2/tasks/install.yml @@ -31,4 +31,4 @@ group: root mode: "755" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hive/hiveserver2/tasks/kerberos.yml b/roles/hive/hiveserver2/tasks/kerberos.yml index aa646b4e..a04fdd26 100644 --- a/roles/hive/hiveserver2/tasks/kerberos.yml +++ b/roles/hive/hiveserver2/tasks/kerberos.yml @@ -8,6 +8,7 @@ tasks_from: install - name: HiveServer2 keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure hive user's principal and keytab exist ansible.builtin.import_role: @@ -30,9 +31,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs -- name: HiveServer2 keytabs cehck +- name: HiveServer2 keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure hive's keytab is working ansible.builtin.import_role: @@ -55,4 +56,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/hive/hiveserver2/tasks/status.yml b/roles/hive/hiveserver2/tasks/status.yml index 20e85aeb..ebe85e0d 100644 --- a/roles/hive/hiveserver2/tasks/status.yml +++ b/roles/hive/hiveserver2/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hive-server2 is running +- name: Assert hive-server2 is running ansible.builtin.assert: that: - ansible_facts.services['hive-server2.service'].state == "running" diff --git a/roles/hive/metastore/tasks/install.yml b/roles/hive/metastore/tasks/install.yml index 6678b153..446b9d09 100644 --- a/roles/hive/metastore/tasks/install.yml +++ b/roles/hive/metastore/tasks/install.yml @@ -42,4 +42,4 @@ group: root mode: "755" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/hive/metastore/tasks/status.yml b/roles/hive/metastore/tasks/status.yml index f7ae0747..f4dc6d51 100644 --- a/roles/hive/metastore/tasks/status.yml +++ b/roles/hive/metastore/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hive-metastore is running +- name: Assert hive-metastore is running ansible.builtin.assert: that: - ansible_facts.services['hive-metastore.service'].state == "running" diff --git a/roles/knox/gateway/tasks/install.yml b/roles/knox/gateway/tasks/install.yml index 01810ce1..9510c2f2 100644 --- a/roles/knox/gateway/tasks/install.yml +++ b/roles/knox/gateway/tasks/install.yml @@ -43,7 +43,7 @@ - "{{ gateway_site['gateway.data.dir'] }}" - "{{ gateway_site['gateway.security.dir'] }}" - "{{ gateway_site['gateway.deployment.dir'] }}" - #- "{{ gateway_site['gateway.services.dir'] }}" + # - "{{ gateway_site['gateway.services.dir'] }}" - name: Template Knox Gateway service file ansible.builtin.template: @@ -53,4 +53,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/knox/gateway/tasks/status.yml b/roles/knox/gateway/tasks/status.yml index 75531e63..872ec11a 100644 --- a/roles/knox/gateway/tasks/status.yml +++ b/roles/knox/gateway/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert knox-gateway is running +- name: Assert knox-gateway is running ansible.builtin.assert: that: - ansible_facts.services['knox-gateway.service'].state == "running" diff --git a/roles/knox/ranger/tasks/init.yml b/roles/knox/ranger/tasks/init.yml index 9e13794e..99043316 100644 --- a/roles/knox/ranger/tasks/init.yml +++ b/roles/knox/ranger/tasks/init.yml @@ -42,7 +42,7 @@ - hdfs-site.xml - core-site.xml -#TODO Fix it in the build instead +# TODO Fix it in the build instead - name: Quickfix of missing jars for ranger plugin ansible.builtin.shell: "ln -s {{ hadoop_root_dir }}/hadoop/share/hadoop/hdfs/hadoop-hdfs-* {{ ranger_knox_install_dir }}/lib/ranger-knox-plugin-impl/" ignore_errors: true diff --git a/roles/ranger/admin/tasks/install.yml b/roles/ranger/admin/tasks/install.yml index e3b99d25..4946cc91 100644 --- a/roles/ranger/admin/tasks/install.yml +++ b/roles/ranger/admin/tasks/install.yml @@ -69,4 +69,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/ranger/admin/tasks/kerberos.yml b/roles/ranger/admin/tasks/kerberos.yml index baeb23ed..8aacb371 100644 --- a/roles/ranger/admin/tasks/kerberos.yml +++ b/roles/ranger/admin/tasks/kerberos.yml @@ -8,6 +8,7 @@ tasks_from: install - name: Ranger Admin keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure rangerlookup user's principal and keytab exist ansible.builtin.import_role: @@ -41,7 +42,7 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - + - name: Ensure HTTP HA spnego user's principal and keytab exist ansible.builtin.import_role: name: tosit.tdp.utils.kerberos @@ -53,9 +54,9 @@ group: "{{ hadoop_group }}" mode: "0640" when: ranger_ha_address is defined - when: krb_create_principals_keytabs - name: Ranger Admin keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure rangerlookup's keytab is working ansible.builtin.import_role: @@ -102,4 +103,3 @@ group: "{{ hadoop_group }}" mode: "0640" when: ranger_ha_address is defined - when: not krb_create_principals_keytabs diff --git a/roles/ranger/admin/tasks/status.yml b/roles/ranger/admin/tasks/status.yml index 87805ebb..e9a36b85 100644 --- a/roles/ranger/admin/tasks/status.yml +++ b/roles/ranger/admin/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert ranger-admin is running +- name: Assert ranger-admin is running ansible.builtin.assert: that: - ansible_facts.services['ranger-admin.service'].state == "running" diff --git a/roles/ranger/kms/tasks/install.yml b/roles/ranger/kms/tasks/install.yml index 71b44618..425474eb 100644 --- a/roles/ranger/kms/tasks/install.yml +++ b/roles/ranger/kms/tasks/install.yml @@ -92,4 +92,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/ranger/kms/tasks/kerberos.yml b/roles/ranger/kms/tasks/kerberos.yml index 84941410..2cc6e693 100644 --- a/roles/ranger/kms/tasks/kerberos.yml +++ b/roles/ranger/kms/tasks/kerberos.yml @@ -8,6 +8,7 @@ tasks_from: install - name: Ranger KMS keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure keyadmin user's principal and keytab exist ansible.builtin.import_role: @@ -30,9 +31,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: Ranger KMS keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure keyadmin's keytab is working ansible.builtin.import_role: @@ -55,4 +56,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/ranger/kms/tasks/status.yml b/roles/ranger/kms/tasks/status.yml index 95c53ad0..b94454a9 100644 --- a/roles/ranger/kms/tasks/status.yml +++ b/roles/ranger/kms/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert ranger-kms is running +- name: Assert ranger-kms is running ansible.builtin.assert: that: - ansible_facts.services['ranger-kms.service'].state == "running" diff --git a/roles/ranger/solr/tasks/install.yml b/roles/ranger/solr/tasks/install.yml index d8251691..54999eed 100644 --- a/roles/ranger/solr/tasks/install.yml +++ b/roles/ranger/solr/tasks/install.yml @@ -145,4 +145,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/ranger/solr/tasks/status.yml b/roles/ranger/solr/tasks/status.yml index 892426c1..74e1d185 100644 --- a/roles/ranger/solr/tasks/status.yml +++ b/roles/ranger/solr/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert solr is running +- name: Assert solr is running ansible.builtin.assert: that: - ansible_facts.services['solr.service'].state == "running" diff --git a/roles/ranger/usersync/tasks/install.yml b/roles/ranger/usersync/tasks/install.yml index b905cf4a..e7ef49b3 100644 --- a/roles/ranger/usersync/tasks/install.yml +++ b/roles/ranger/usersync/tasks/install.yml @@ -70,4 +70,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/ranger/usersync/tasks/status.yml b/roles/ranger/usersync/tasks/status.yml index de28b7e9..f1e16a75 100644 --- a/roles/ranger/usersync/tasks/status.yml +++ b/roles/ranger/usersync/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert ranger-usersync is running +- name: Assert ranger-usersync is running ansible.builtin.assert: that: - ansible_facts.services['ranger-usersync.service'].state == "running" diff --git a/roles/spark/historyserver/tasks/install.yml b/roles/spark/historyserver/tasks/install.yml index b6adad33..d16cf845 100644 --- a/roles/spark/historyserver/tasks/install.yml +++ b/roles/spark/historyserver/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/spark/historyserver/tasks/kerberos.yml b/roles/spark/historyserver/tasks/kerberos.yml index 88b43ceb..e2f3f2e0 100644 --- a/roles/spark/historyserver/tasks/kerberos.yml +++ b/roles/spark/historyserver/tasks/kerberos.yml @@ -13,6 +13,7 @@ tasks_from: kerberos - name: Spark HS keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure spark user's principal and keytab exist ansible.builtin.import_role: @@ -35,9 +36,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: Spark HS keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure spark keytab works ansible.builtin.import_role: @@ -60,4 +61,3 @@ user: root group: "{{ hadoop_group }}" mode: "640" - when: not krb_create_principals_keytabs diff --git a/roles/utils/kerberos/tasks/install.yml b/roles/utils/kerberos/tasks/install.yml index da082aa7..fac40c98 100644 --- a/roles/utils/kerberos/tasks/install.yml +++ b/roles/utils/kerberos/tasks/install.yml @@ -8,4 +8,4 @@ state: directory owner: root group: root - mode: 0755 + mode: "755" diff --git a/roles/yarn/apptimelineserver/tasks/install.yml b/roles/yarn/apptimelineserver/tasks/install.yml index 445fb63b..d3902647 100644 --- a/roles/yarn/apptimelineserver/tasks/install.yml +++ b/roles/yarn/apptimelineserver/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/yarn/apptimelineserver/tasks/kerberos.yml b/roles/yarn/apptimelineserver/tasks/kerberos.yml index 38c3635e..b5a05fea 100644 --- a/roles/yarn/apptimelineserver/tasks/kerberos.yml +++ b/roles/yarn/apptimelineserver/tasks/kerberos.yml @@ -13,6 +13,7 @@ tasks_from: kerberos - name: YARN ATS keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure yarn ats user's principal and keytab exist ansible.builtin.import_role: @@ -35,9 +36,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: YARN ATS keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure yarn ats user's keytab is working ansible.builtin.import_role: @@ -60,4 +61,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/yarn/apptimelineserver/tasks/status.yml b/roles/yarn/apptimelineserver/tasks/status.yml index 528796af..732b2106 100644 --- a/roles/yarn/apptimelineserver/tasks/status.yml +++ b/roles/yarn/apptimelineserver/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-yarn-timelineserver is running +- name: Assert hadoop-yarn-timelineserver is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-timelineserver.service'].state == "running" diff --git a/roles/yarn/jobhistoryserver/tasks/install.yml b/roles/yarn/jobhistoryserver/tasks/install.yml index d13e524a..762f8025 100644 --- a/roles/yarn/jobhistoryserver/tasks/install.yml +++ b/roles/yarn/jobhistoryserver/tasks/install.yml @@ -55,4 +55,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/yarn/jobhistoryserver/tasks/kerberos.yml b/roles/yarn/jobhistoryserver/tasks/kerberos.yml index 385dc80c..f6ee423e 100644 --- a/roles/yarn/jobhistoryserver/tasks/kerberos.yml +++ b/roles/yarn/jobhistoryserver/tasks/kerberos.yml @@ -13,6 +13,7 @@ tasks_from: kerberos - name: YARN JHS keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure mapred jhs user's principal and keytab exist ansible.builtin.import_role: @@ -35,9 +36,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: YARN JHS keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure mapred jhs user's keytab is working ansible.builtin.import_role: @@ -60,4 +61,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/yarn/jobhistoryserver/tasks/status.yml b/roles/yarn/jobhistoryserver/tasks/status.yml index ffedc2e1..5e36bdd6 100644 --- a/roles/yarn/jobhistoryserver/tasks/status.yml +++ b/roles/yarn/jobhistoryserver/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-mapred-jobhistoryserver is running +- name: Assert hadoop-mapred-jobhistoryserver is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-mapred-jobhistoryserver.service'].state == "running" diff --git a/roles/yarn/nodemanager/tasks/install.yml b/roles/yarn/nodemanager/tasks/install.yml index 0c2fbcec..68937fe5 100644 --- a/roles/yarn/nodemanager/tasks/install.yml +++ b/roles/yarn/nodemanager/tasks/install.yml @@ -51,7 +51,7 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload - name: Set bin/container-executor ownership, group and permissions ansible.builtin.file: @@ -71,13 +71,13 @@ loop: "{{ cgroups_yarn_dirs }}" when: cgroups_enabled -- name: Apply recursively mode to yarn cgroups dirs +- name: Apply recursively mode to yarn cgroups dirs ansible.builtin.file: path: "{{ item.path }}" state: directory owner: "{{ item.owner }}" group: "{{ item.group }}" mode: "{{ item.mode }}" - recurse: yes + recurse: true loop: "{{ cgroups_yarn_dirs }}" when: cgroups_enabled diff --git a/roles/yarn/nodemanager/tasks/kerberos.yml b/roles/yarn/nodemanager/tasks/kerberos.yml index babe94c4..fe604487 100644 --- a/roles/yarn/nodemanager/tasks/kerberos.yml +++ b/roles/yarn/nodemanager/tasks/kerberos.yml @@ -13,6 +13,7 @@ tasks_from: kerberos - name: YARN RM keytabs creation + when: krb_create_principals_keytabs block: - name: Ensure yarn nm user's principal and keytab exist ansible.builtin.import_role: @@ -35,9 +36,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: YARN RM keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure yarn nm user's keytab is working ansible.builtin.import_role: @@ -60,4 +61,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/yarn/nodemanager/tasks/status.yml b/roles/yarn/nodemanager/tasks/status.yml index 1c0aebfe..d0f46aeb 100644 --- a/roles/yarn/nodemanager/tasks/status.yml +++ b/roles/yarn/nodemanager/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-yarn-nodemanager is running +- name: Assert hadoop-yarn-nodemanager is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-nodemanager.service'].state == "running" diff --git a/roles/yarn/resourcemanager/tasks/install.yml b/roles/yarn/resourcemanager/tasks/install.yml index 80d29631..18619df8 100644 --- a/roles/yarn/resourcemanager/tasks/install.yml +++ b/roles/yarn/resourcemanager/tasks/install.yml @@ -23,4 +23,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/yarn/resourcemanager/tasks/kerberos.yml b/roles/yarn/resourcemanager/tasks/kerberos.yml index a4939518..963a62ef 100644 --- a/roles/yarn/resourcemanager/tasks/kerberos.yml +++ b/roles/yarn/resourcemanager/tasks/kerberos.yml @@ -20,7 +20,8 @@ group: root mode: "644" -- block: +- when: krb_create_principals_keytabs + block: - name: Ensure yarn rm user's principal and keytab exist ansible.builtin.import_role: name: tosit.tdp.utils.kerberos @@ -42,9 +43,9 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: krb_create_principals_keytabs - name: YARN RM keytabs check + when: not krb_create_principals_keytabs block: - name: Ensure yarn rm user's keytab is working ansible.builtin.import_role: @@ -67,4 +68,3 @@ user: root group: "{{ hadoop_group }}" mode: "0640" - when: not krb_create_principals_keytabs diff --git a/roles/yarn/resourcemanager/tasks/status.yml b/roles/yarn/resourcemanager/tasks/status.yml index 042baccc..b7a57549 100644 --- a/roles/yarn/resourcemanager/tasks/status.yml +++ b/roles/yarn/resourcemanager/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: Assert hadoop-yarn-resourcemanager is running +- name: Assert hadoop-yarn-resourcemanager is running ansible.builtin.assert: that: - ansible_facts.services['hadoop-yarn-resourcemanager.service'].state == "running" diff --git a/roles/zookeeper/server/tasks/check.yml b/roles/zookeeper/server/tasks/check.yml index 858a65dc..b37f5d5c 100644 --- a/roles/zookeeper/server/tasks/check.yml +++ b/roles/zookeeper/server/tasks/check.yml @@ -11,7 +11,7 @@ failed_when: zk_systemd_res.ansible_facts.services["zookeeper.service"].state != 'running' - name: ZK server component check - Check ZK port - ansible.builtin.shell: /usr/bin/ncat -nzv 127.0.0.1 {{ zookeeper_server_client_port }} + ansible.builtin.command: /usr/bin/ncat -nzv 127.0.0.1 {{ zookeeper_server_client_port }} register: zk_port_res retries: "{{ zookeeper_check_retries }}" delay: "{{ zookeeper_check_delay }}" diff --git a/roles/zookeeper/server/tasks/install.yml b/roles/zookeeper/server/tasks/install.yml index 838cb3df..75cdf627 100644 --- a/roles/zookeeper/server/tasks/install.yml +++ b/roles/zookeeper/server/tasks/install.yml @@ -47,4 +47,4 @@ group: root mode: "644" notify: - - systemctl daemon-reload + - systemctl daemon-reload diff --git a/roles/zookeeper/server/tasks/status.yml b/roles/zookeeper/server/tasks/status.yml index 299995cc..e066ccd0 100644 --- a/roles/zookeeper/server/tasks/status.yml +++ b/roles/zookeeper/server/tasks/status.yml @@ -5,7 +5,7 @@ - name: Populate service facts ansible.builtin.service_facts: -- name: "Assert {{ zookeeper_server_service_name }} is running" +- name: "Assert {{ zookeeper_server_service_name }} is running" ansible.builtin.assert: that: - ansible_facts.services['{{ zookeeper_server_service_name }}.service'].state == "running" From 12ccfafa3ad7f6b71933bcc2932865e376a84b2f Mon Sep 17 00:00:00 2001 From: Romain Pignolet Date: Mon, 10 Jul 2023 01:20:24 +0200 Subject: [PATCH 18/20] feat: remove useless playbook --- playbooks/tests/test_user_group.yml | 120 ---------------------------- 1 file changed, 120 deletions(-) delete mode 100644 playbooks/tests/test_user_group.yml diff --git a/playbooks/tests/test_user_group.yml b/playbooks/tests/test_user_group.yml deleted file mode 100644 index f7f8d41c..00000000 --- a/playbooks/tests/test_user_group.yml +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- hosts: edge - collections: - - tosit.tdp - vars: - # ldap_admin_dn: - # ldap_admin_pwd: - ldap_group_base: ou=groups,c=fr - ldap_user_base: ou=users,c=fr - test_user: testuser - test_password: testpassword - test_group: testgroup - test_uid: 1100 - test_gid: 2100 - - tasks: - - name: Install openldap client - ansible.builtin.package: - name: openldap-clients - - - name: Create test group ldif - ansible.builtin.copy: - content: | - dn: cn={{ test_group }},{{ ldap_group_base }} - objectClass: top - objectClass: posixGroup - cn: {{ test_group }} - gidNumber: {{ test_gid }} - dest: /tmp/testgroup.ldif - - - name: Apply test group ldif - ansible.builtin.command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testgroup.ldif" - register: reg_ldapadd_user - failed_when: | - reg_ldapadd_user is failed and - reg_ldapadd_user.rc != 68 - changed_when: reg_ldapadd_user.rc != 68 - - - name: Create test user ldif - ansible.builtin.copy: - content: | - dn: uid={{ test_user }},{{ ldap_user_base }} - uid: {{ test_user }} - objectClass: posixAccount - objectClass: inetOrgPerson - cn: Test user - sn: Test - uidNumber: {{ test_uid }} - gidNumber: {{ test_gid }} - homeDirectory: /home/{{ test_user }} - loginShell: /bin/bash - dest: /tmp/testuser.ldif - - - name: Apply test group ldif - ansible.builtin.command: "ldapadd -x -D {{ ldap_admin_dn }} -w {{ ldap_admin_pwd }} -h {{ groups['ldap'][0] | tosit.tdp.access_fqdn(hostvars) }} -f /tmp/testuser.ldif" - register: reg_ldapadd_group - failed_when: | - reg_ldapadd_group is failed and - reg_ldapadd_group.rc != 68 - changed_when: reg_ldapadd_group.rc != 68 - - - name: Check user - ansible.builtin.command: "id -u {{ test_user }}" - changed_when: false - register: reg_check_user - - - name: Check group - ansible.builtin.command: "id -ng {{ test_user }}" - changed_when: false - register: reg_check_group - - - name: Assert that user is pulled from ldap to unix - ansible.builtin.assert: - that: - - reg_check_user.stdout == (test_uid | string) - success_msg: User correctly pulled from ldap - fail_msg: User not pulled from ldap. - - - name: Assert that group is pulled from ldap to unix - ansible.builtin.assert: - that: - - reg_check_group.stdout == test_group - success_msg: Group correctly pulled from ldap - fail_msg: Group not pulled from ldap. - - - name: Create Kerberos user - ansible.builtin.command: "kadmin -r {{ realm }} -p {{ kadmin_principal }} -w {{ kadmin_password }} -q \"addprinc -pw {{ test_password }} {{ test_user }}@{{ realm }}\"" - - - name: Get user keytab - ansible.builtin.shell: | - set timeout 10 - spawn ktutil - - expect "ktutil:" - send "add_entry -password -p {{ test_user }}@{{ realm }} -k 1 -e aes256-cts-hmac-sha1-96\r" - - expect "Password for {{ test_user }}@{{ realm }}:" - send "{{ test_password }}\r" - - expect "ktutil:" - send "add_entry -password -p {{ test_user }}@{{ realm }} -k 1 -e aes128-cts-hmac-sha1-96\r" - - expect "Password for {{ test_user }}@{{ realm }}:" - send "{{ test_password }}\r" - - expect "ktutil:" - send "write_kt {{ test_user }}.keytab\r" - - expect "ktutil:" - send "quit\r" - - expect eof - exit 0 - args: - executable: /usr/bin/expect - creates: "{{ test_user }}.keytab" - register: reg_ktutil From 551dd659d580ea13f5e583a2e4f34bddddca8f1b Mon Sep 17 00:00:00 2001 From: Romain Pignolet Date: Tue, 1 Aug 2023 22:39:15 +0200 Subject: [PATCH 19/20] feat: remove legacy "restart_*" playbooks --- playbooks/restart_all.yml | 13 ------------- playbooks/restart_hbase.yml | 8 -------- playbooks/restart_hdfs.yml | 7 ------- playbooks/restart_hive.yml | 6 ------ playbooks/restart_knox.yml | 5 ----- playbooks/restart_ranger.yml | 6 ------ playbooks/restart_spark.yml | 5 ----- playbooks/restart_spark3.yml | 5 ----- playbooks/restart_yarn.yml | 8 -------- playbooks/restart_zookeeper.yml | 5 ----- 10 files changed, 68 deletions(-) delete mode 100644 playbooks/restart_all.yml delete mode 100644 playbooks/restart_hbase.yml delete mode 100644 playbooks/restart_hdfs.yml delete mode 100644 playbooks/restart_hive.yml delete mode 100644 playbooks/restart_knox.yml delete mode 100644 playbooks/restart_ranger.yml delete mode 100644 playbooks/restart_spark.yml delete mode 100644 playbooks/restart_spark3.yml delete mode 100644 playbooks/restart_yarn.yml delete mode 100644 playbooks/restart_zookeeper.yml diff --git a/playbooks/restart_all.yml b/playbooks/restart_all.yml deleted file mode 100644 index da9c0ff2..00000000 --- a/playbooks/restart_all.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: restart_zookeeper.yml -- ansible.builtin.import_playbook: restart_hdfs.yml -- ansible.builtin.import_playbook: restart_yarn.yml -- ansible.builtin.import_playbook: restart_hbase.yml -- ansible.builtin.import_playbook: restart_ranger.yml -- ansible.builtin.import_playbook: restart_hive.yml -- ansible.builtin.import_playbook: restart_spark.yml -- ansible.builtin.import_playbook: restart_spark3.yml -- ansible.builtin.import_playbook: restart_knox.yml diff --git a/playbooks/restart_hbase.yml b/playbooks/restart_hbase.yml deleted file mode 100644 index 20cb4c84..00000000 --- a/playbooks/restart_hbase.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: hbase_master_restart.yml -- ansible.builtin.import_playbook: hbase_regionserver_restart.yml -- ansible.builtin.import_playbook: hbase_rest_restart.yml -- ansible.builtin.import_playbook: hbase_phoenix_queryserver_daemon_restart.yml diff --git a/playbooks/restart_hdfs.yml b/playbooks/restart_hdfs.yml deleted file mode 100644 index e55281ca..00000000 --- a/playbooks/restart_hdfs.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: hdfs_namenode_restart.yml -- ansible.builtin.import_playbook: hdfs_journalnode_restart.yml -- ansible.builtin.import_playbook: hdfs_datanode_restart.yml diff --git a/playbooks/restart_hive.yml b/playbooks/restart_hive.yml deleted file mode 100644 index cd6818f6..00000000 --- a/playbooks/restart_hive.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: hive_hiveserver2_restart.yml -- ansible.builtin.import_playbook: hive_metastore_restart.yml diff --git a/playbooks/restart_knox.yml b/playbooks/restart_knox.yml deleted file mode 100644 index 5a245ea4..00000000 --- a/playbooks/restart_knox.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: knox_gateway_restart.yml diff --git a/playbooks/restart_ranger.yml b/playbooks/restart_ranger.yml deleted file mode 100644 index 543dfee6..00000000 --- a/playbooks/restart_ranger.yml +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: ranger_admin_restart.yml -- ansible.builtin.import_playbook: ranger_usersync_restart.yml diff --git a/playbooks/restart_spark.yml b/playbooks/restart_spark.yml deleted file mode 100644 index 7e920b72..00000000 --- a/playbooks/restart_spark.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: spark_historyserver_restart.yml diff --git a/playbooks/restart_spark3.yml b/playbooks/restart_spark3.yml deleted file mode 100644 index 24878c3d..00000000 --- a/playbooks/restart_spark3.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: spark3_historyserver_restart.yml diff --git a/playbooks/restart_yarn.yml b/playbooks/restart_yarn.yml deleted file mode 100644 index dfe18098..00000000 --- a/playbooks/restart_yarn.yml +++ /dev/null @@ -1,8 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: yarn_resourcemanager_restart.yml -- ansible.builtin.import_playbook: yarn_nodemanager_restart.yml -- ansible.builtin.import_playbook: yarn_apptimelineserver_restart.yml -- ansible.builtin.import_playbook: yarn_mapred_jobhistoryserver_restart.yml diff --git a/playbooks/restart_zookeeper.yml b/playbooks/restart_zookeeper.yml deleted file mode 100644 index e6c71ab6..00000000 --- a/playbooks/restart_zookeeper.yml +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2022 TOSIT.IO -# SPDX-License-Identifier: Apache-2.0 - ---- -- ansible.builtin.import_playbook: zookeeper_server_restart.yml From f5bd4e5dccdfaed0fb99c069a00375228490e55b Mon Sep 17 00:00:00 2001 From: Romain Pignolet Date: Wed, 9 Aug 2023 23:35:39 +0200 Subject: [PATCH 20/20] feat(playbooks): add playbook to wait (useful for tdp-lib) --- playbooks/wait_sleep.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 playbooks/wait_sleep.yml diff --git a/playbooks/wait_sleep.yml b/playbooks/wait_sleep.yml new file mode 100644 index 00000000..9645b669 --- /dev/null +++ b/playbooks/wait_sleep.yml @@ -0,0 +1,12 @@ +# Copyright 2022 TOSIT.IO +# SPDX-License-Identifier: Apache-2.0 + +--- +- name: Wait sleep + hosts: localhost + gather_facts: false + become: false + tasks: + - name: Wait {{ wait_sleep_seconds | default(1) }} seconds + ansible.builtin.pause: + seconds: "{{ wait_sleep_seconds | default(1) }}"