From a2f2efbf37337da52e15cefa2abe015d41ace2e3 Mon Sep 17 00:00:00 2001 From: Webster Mudge Date: Thu, 7 Aug 2025 15:18:00 -0400 Subject: [PATCH] Update for ansible-lint Signed-off-by: Webster Mudge --- .ansible-lint | 1 + .../tasks/prepare_auto_repo_mirror.yml | 1 - .../tasks/update_mirror_cache.yml | 1 - roles/blackbox_exporter/handlers/main.yml | 1 - roles/caddy/handlers/main.yml | 5 ++-- roles/caddy/meta/argument_specs.yml | 1 + roles/caddy/tasks/RedHat-pre.yml | 1 - roles/caddy/tasks/main.yml | 1 - roles/caddy/vars/RedHat.yml | 1 + roles/caddy/vars/default.yml | 1 + roles/cm_agent/handlers/main.yml | 1 + roles/cm_agent/meta/argument_specs.yml | 1 + roles/cm_agent/molecule/default/converge.yml | 1 + roles/cm_agent/molecule/default/create.yml | 7 ++--- roles/cm_agent/molecule/default/destroy.yml | 5 ++-- roles/cm_agent/molecule/default/molecule.yml | 21 ++++++++------- roles/cm_agent/molecule/default/prepare.yml | 5 ++-- .../molecule/default/requirements.yml | 1 + roles/cm_agent/molecule/default/verify.yml | 1 + roles/cm_agent/tasks/main.yml | 1 + roles/cm_csd/defaults/main.yml | 6 ++--- roles/cm_csd/meta/argument_specs.yml | 1 + roles/cm_csd/molecule/default/converge.yml | 1 + roles/cm_csd/molecule/default/create.yml | 7 ++--- roles/cm_csd/molecule/default/destroy.yml | 5 ++-- roles/cm_csd/molecule/default/molecule.yml | 1 + roles/cm_csd/molecule/default/prepare.yml | 1 + .../cm_csd/molecule/default/requirements.yml | 1 + roles/cm_csd/molecule/default/verify.yml | 3 +-- roles/cm_csd/tasks/main.yml | 1 - roles/cm_repo/defaults/main.yml | 1 + roles/cm_repo/meta/argument_specs.yml | 5 ++-- roles/cm_repo/molecule/default/converge.yml | 1 + roles/cm_repo/molecule/default/create.yml | 7 ++--- roles/cm_repo/molecule/default/destroy.yml | 5 ++-- roles/cm_repo/molecule/default/molecule.yml | 27 ++++++++++--------- .../cm_repo/molecule/default/requirements.yml | 1 + roles/cm_repo/molecule/default/verify.yml | 1 + roles/cm_repo/tasks/RedHat.yml | 1 + roles/cm_repo/tasks/main.yml | 1 + roles/cm_repo/vars/RedHat-CM5.yml | 1 + roles/cm_repo/vars/RedHat-CM6.yml | 1 + roles/cm_repo/vars/RedHat.yml | 1 + roles/cm_repo/vars/main.yml | 1 + roles/cm_server/defaults/main.yml | 1 + roles/cm_server/handlers/main.yml | 1 + roles/cm_server/meta/argument_specs.yml | 1 + roles/cm_server/molecule/default/converge.yml | 1 + roles/cm_server/molecule/default/create.yml | 7 ++--- roles/cm_server/molecule/default/destroy.yml | 5 ++-- roles/cm_server/molecule/default/molecule.yml | 27 ++++++++++--------- roles/cm_server/molecule/default/prepare.yml | 3 +++ .../molecule/default/requirements.yml | 1 + roles/cm_server/molecule/default/verify.yml | 1 + roles/cm_server/tasks/main.yml | 1 + roles/common/tasks/main.yml | 1 + .../tasks/parse_inventory_template.yml | 2 -- roles/grafana/meta/argument_specs.yml | 1 + roles/grafana/tasks/CentOS.yml | 1 - roles/grafana/tasks/Ubuntu.yml | 1 - roles/grafana/tasks/main.yml | 1 - roles/mount/defaults/main.yml | 1 + roles/mount/meta/argument_specs.yml | 1 - roles/mount/tasks/main.yml | 3 --- roles/mount/tasks/volume.yml | 2 -- roles/node_exporter/handlers/main.yml | 1 - roles/node_exporter/tasks/main.yml | 1 - .../molecule/default/prepare.yml | 8 +++--- .../molecule/default/prepare.yml | 8 +++--- .../molecule/default/prepare.yml | 8 +++--- roles/prereq_ecs/meta/argument_specs.yml | 4 +-- .../molecule/default/prepare.yml | 6 +++-- .../molecule/default/prepare.yml | 1 + roles/prereq_kernel/meta/argument_specs.yml | 3 +-- .../meta/argument_specs.yml | 4 +-- .../molecule/default/prepare.yml | 1 + .../molecule/default/prepare.yml | 1 + .../molecule/default/prepare.yml | 1 + .../molecule/default/prepare.yml | 1 + .../molecule/default/prepare.yml | 1 + .../molecule/default/prepare.yml | 1 + roles/prereq_smm_database/defaults/main.yml | 3 +-- .../meta/argument_specs.yml | 5 ++-- .../molecule/default/converge.yml | 5 ++-- .../molecule/default/create.yml | 7 ++--- .../molecule/default/destroy.yml | 5 ++-- .../molecule/default/molecule.yml | 1 + .../molecule/default/prepare.yml | 6 +++-- .../molecule/default/requirements.yml | 1 + .../molecule/default/verify.yml | 3 ++- roles/prereq_smm_database/tasks/main.yml | 3 +-- .../molecule/default/prepare.yml | 1 + roles/prometheus/handlers/main.yml | 1 - roles/prometheus/meta/argument_specs.yml | 1 + roles/prometheus/tasks/main.yml | 1 - roles/provision/tasks/main.yml | 1 - .../client/mysql_connector/tasks/main.yml | 1 - .../client/oracle_connector/tasks/main.yml | 1 - .../postgresql_connector/tasks/main.yml | 1 - roles/rdbms/server/tasks/main.yml | 1 - roles/rdbms_server/tasks/main.yml | 1 - 101 files changed, 173 insertions(+), 128 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 6bbceaa3..ba4d4678 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/auto_repo_mirror/tasks/prepare_auto_repo_mirror.yml b/roles/auto_repo_mirror/tasks/prepare_auto_repo_mirror.yml index 3c8f2047..27e94ecf 100644 --- a/roles/auto_repo_mirror/tasks/prepare_auto_repo_mirror.yml +++ b/roles/auto_repo_mirror/tasks/prepare_auto_repo_mirror.yml @@ -1,5 +1,4 @@ --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/auto_repo_mirror/tasks/update_mirror_cache.yml b/roles/auto_repo_mirror/tasks/update_mirror_cache.yml index f283ac32..252764d6 100644 --- a/roles/auto_repo_mirror/tasks/update_mirror_cache.yml +++ b/roles/auto_repo_mirror/tasks/update_mirror_cache.yml @@ -1,5 +1,4 @@ --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/blackbox_exporter/handlers/main.yml b/roles/blackbox_exporter/handlers/main.yml index 1548211e..2a20468f 100644 --- a/roles/blackbox_exporter/handlers/main.yml +++ b/roles/blackbox_exporter/handlers/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Start blackbox service block: - name: Reload systemd daemon diff --git a/roles/caddy/handlers/main.yml b/roles/caddy/handlers/main.yml index c00513b6..3c82a25d 100644 --- a/roles/caddy/handlers/main.yml +++ b/roles/caddy/handlers/main.yml @@ -13,8 +13,7 @@ # limitations under the License. --- - - name: Reload Caddy ansible.builtin.service: - name: "{{ caddy_service }}" - state: reloaded + name: "{{ caddy_service }}" + state: reloaded diff --git a/roles/caddy/meta/argument_specs.yml b/roles/caddy/meta/argument_specs.yml index 63e83b89..6b24f839 100644 --- a/roles/caddy/meta/argument_specs.yml +++ b/roles/caddy/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/caddy/tasks/RedHat-pre.yml b/roles/caddy/tasks/RedHat-pre.yml index f1929724..5c7068c6 100644 --- a/roles/caddy/tasks/RedHat-pre.yml +++ b/roles/caddy/tasks/RedHat-pre.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Enable Fedora COPR ansible.builtin.package: name: "dnf-command(copr)" diff --git a/roles/caddy/tasks/main.yml b/roles/caddy/tasks/main.yml index 7ddcd15b..f67476e8 100644 --- a/roles/caddy/tasks/main.yml +++ b/roles/caddy/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Gather host distribution details ansible.builtin.setup: gather_subset: distribution diff --git a/roles/caddy/vars/RedHat.yml b/roles/caddy/vars/RedHat.yml index cb834692..3cc5d3f8 100644 --- a/roles/caddy/vars/RedHat.yml +++ b/roles/caddy/vars/RedHat.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/caddy/vars/default.yml b/roles/caddy/vars/default.yml index cb834692..3cc5d3f8 100644 --- a/roles/caddy/vars/default.yml +++ b/roles/caddy/vars/default.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/handlers/main.yml b/roles/cm_agent/handlers/main.yml index c98e281f..54661a1c 100644 --- a/roles/cm_agent/handlers/main.yml +++ b/roles/cm_agent/handlers/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/meta/argument_specs.yml b/roles/cm_agent/meta/argument_specs.yml index 9e8b5ee0..7845f6f4 100644 --- a/roles/cm_agent/meta/argument_specs.yml +++ b/roles/cm_agent/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/molecule/default/converge.yml b/roles/cm_agent/molecule/default/converge.yml index 1763cff1..a420a365 100644 --- a/roles/cm_agent/molecule/default/converge.yml +++ b/roles/cm_agent/molecule/default/converge.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/molecule/default/create.yml b/roles/cm_agent/molecule/default/create.yml index 132438bf..41583e5e 100644 --- a/roles/cm_agent/molecule/default/create.yml +++ b/roles/cm_agent/molecule/default/create.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_assign_public_ip: true @@ -38,7 +39,7 @@ default_public_key_path: "{{ default_private_key_path }}.pub" default_ssh_user: ansible default_ssh_port: 22 - default_user_data: '' + default_user_data: "" default_security_group_name: "molecule-{{ run_config.run_id }}" default_security_group_description: Ephemeral security group for Molecule instances @@ -123,7 +124,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_agent/molecule/default/destroy.yml b/roles/cm_agent/molecule/default/destroy.yml index fb95a201..a090fe0b 100644 --- a/roles/cm_agent/molecule/default/destroy.yml +++ b/roles/cm_agent/molecule/default/destroy.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" @@ -69,7 +70,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_agent/molecule/default/molecule.yml b/roles/cm_agent/molecule/default/molecule.yml index 3eb648fd..5c959a20 100644 --- a/roles/cm_agent/molecule/default/molecule.yml +++ b/roles/cm_agent/molecule/default/molecule.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,16 +38,16 @@ platforms: tags: Name: molecule-cm_agent-rhel9-4 Project: Molecule testing for cm_agent - # Ubuntu 20.04 - # - name: ubuntu20.04.molecule.internal - # image_owner: "099720109477" - # image_name: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* - # instance_type: t3.medium - # boot_wait_seconds: 15 - # vpc_subnet_id: ${TEST_VPC_SUBNET_ID} - # tags: - # Name: molecule-cm_agent-ubuntu20-04 - # Project: Molecule testing for cm_agent +# Ubuntu 20.04 +# - name: ubuntu20.04.molecule.internal +# image_owner: "099720109477" +# image_name: ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-* +# instance_type: t3.medium +# boot_wait_seconds: 15 +# vpc_subnet_id: ${TEST_VPC_SUBNET_ID} +# tags: +# Name: molecule-cm_agent-ubuntu20-04 +# Project: Molecule testing for cm_agent provisioner: name: ansible inventory: diff --git a/roles/cm_agent/molecule/default/prepare.yml b/roles/cm_agent/molecule/default/prepare.yml index 1e6f3eba..19b2fbb6 100644 --- a/roles/cm_agent/molecule/default/prepare.yml +++ b/roles/cm_agent/molecule/default/prepare.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +15,8 @@ - name: Prepare hosts: all - gather_facts: yes - become: yes + gather_facts: true + become: true tasks: - name: Set up enterprise Cloudera Manager package repository ansible.builtin.import_role: diff --git a/roles/cm_agent/molecule/default/requirements.yml b/roles/cm_agent/molecule/default/requirements.yml index e93aa0a5..724080bb 100644 --- a/roles/cm_agent/molecule/default/requirements.yml +++ b/roles/cm_agent/molecule/default/requirements.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/molecule/default/verify.yml b/roles/cm_agent/molecule/default/verify.yml index 8316dab1..a4ad1c2c 100644 --- a/roles/cm_agent/molecule/default/verify.yml +++ b/roles/cm_agent/molecule/default/verify.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_agent/tasks/main.yml b/roles/cm_agent/tasks/main.yml index fa0c3c85..98cf30fd 100644 --- a/roles/cm_agent/tasks/main.yml +++ b/roles/cm_agent/tasks/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/defaults/main.yml b/roles/cm_csd/defaults/main.yml index b360a6bd..7dc1f8f0 100644 --- a/roles/cm_csd/defaults/main.yml +++ b/roles/cm_csd/defaults/main.yml @@ -14,9 +14,9 @@ --- -cloudera_manager_csd_directory: "/opt/cloudera/csd" # noqa: var-naming[no-role-prefix] -cloudera_manager_csds: [] # noqa: var-naming[no-role-prefix] -cloudera_manager_csd_restarted: false # noqa: var-naming[no-role-prefix] +cloudera_manager_csd_directory: "/opt/cloudera/csd" # noqa: var-naming[no-role-prefix] +cloudera_manager_csds: [] # noqa: var-naming[no-role-prefix] +cloudera_manager_csd_restarted: false # noqa: var-naming[no-role-prefix] # cloudera_manager_repo_username: # cloudera_manager_repo_password: diff --git a/roles/cm_csd/meta/argument_specs.yml b/roles/cm_csd/meta/argument_specs.yml index 49b74bef..7ec98ef4 100644 --- a/roles/cm_csd/meta/argument_specs.yml +++ b/roles/cm_csd/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/molecule/default/converge.yml b/roles/cm_csd/molecule/default/converge.yml index 69b2561e..c9a42a58 100644 --- a/roles/cm_csd/molecule/default/converge.yml +++ b/roles/cm_csd/molecule/default/converge.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/molecule/default/create.yml b/roles/cm_csd/molecule/default/create.yml index 132438bf..41583e5e 100644 --- a/roles/cm_csd/molecule/default/create.yml +++ b/roles/cm_csd/molecule/default/create.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_assign_public_ip: true @@ -38,7 +39,7 @@ default_public_key_path: "{{ default_private_key_path }}.pub" default_ssh_user: ansible default_ssh_port: 22 - default_user_data: '' + default_user_data: "" default_security_group_name: "molecule-{{ run_config.run_id }}" default_security_group_description: Ephemeral security group for Molecule instances @@ -123,7 +124,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_csd/molecule/default/destroy.yml b/roles/cm_csd/molecule/default/destroy.yml index fb95a201..a090fe0b 100644 --- a/roles/cm_csd/molecule/default/destroy.yml +++ b/roles/cm_csd/molecule/default/destroy.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" @@ -69,7 +70,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_csd/molecule/default/molecule.yml b/roles/cm_csd/molecule/default/molecule.yml index 80a53bbb..197f41c4 100644 --- a/roles/cm_csd/molecule/default/molecule.yml +++ b/roles/cm_csd/molecule/default/molecule.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/molecule/default/prepare.yml b/roles/cm_csd/molecule/default/prepare.yml index 68a717bf..26af9b45 100644 --- a/roles/cm_csd/molecule/default/prepare.yml +++ b/roles/cm_csd/molecule/default/prepare.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/molecule/default/requirements.yml b/roles/cm_csd/molecule/default/requirements.yml index e93aa0a5..724080bb 100644 --- a/roles/cm_csd/molecule/default/requirements.yml +++ b/roles/cm_csd/molecule/default/requirements.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_csd/molecule/default/verify.yml b/roles/cm_csd/molecule/default/verify.yml index d8ffde93..c549f9f5 100644 --- a/roles/cm_csd/molecule/default/verify.yml +++ b/roles/cm_csd/molecule/default/verify.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Verify hosts: all gather_facts: false @@ -23,7 +22,7 @@ ansible.builtin.find: paths: "/opt/cloudera/csd" patterns: - - '*.jar' + - "*.jar" recurse: false register: __csd failed_when: __csd.matched != 3 diff --git a/roles/cm_csd/tasks/main.yml b/roles/cm_csd/tasks/main.yml index aef38c99..2f9a6ba0 100644 --- a/roles/cm_csd/tasks/main.yml +++ b/roles/cm_csd/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Create CSD directory ansible.builtin.file: path: "{{ cloudera_manager_csd_directory }}" diff --git a/roles/cm_repo/defaults/main.yml b/roles/cm_repo/defaults/main.yml index c87e7512..e4074a11 100644 --- a/roles/cm_repo/defaults/main.yml +++ b/roles/cm_repo/defaults/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/meta/argument_specs.yml b/roles/cm_repo/meta/argument_specs.yml index 22d40445..0bbe9ae4 100644 --- a/roles/cm_repo/meta/argument_specs.yml +++ b/roles/cm_repo/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,8 +26,8 @@ argument_specs: cloudera_manager_version: description: - Version of Cloudera Manager. - - If not defined and C(cloudera_manager_repo_username) is not defined, will default to the C(7.4.4) trial version, - if compatiable with the OS distribution. + - If not defined and C(cloudera_manager_repo_username) is not defined, will default to the C(7.4.4) trial version, if compatiable with the OS + distribution. default: 7.11.3 cloudera_manager_repo_url: description: diff --git a/roles/cm_repo/molecule/default/converge.yml b/roles/cm_repo/molecule/default/converge.yml index 7821fcba..df1721b0 100644 --- a/roles/cm_repo/molecule/default/converge.yml +++ b/roles/cm_repo/molecule/default/converge.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/molecule/default/create.yml b/roles/cm_repo/molecule/default/create.yml index 132438bf..41583e5e 100644 --- a/roles/cm_repo/molecule/default/create.yml +++ b/roles/cm_repo/molecule/default/create.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_assign_public_ip: true @@ -38,7 +39,7 @@ default_public_key_path: "{{ default_private_key_path }}.pub" default_ssh_user: ansible default_ssh_port: 22 - default_user_data: '' + default_user_data: "" default_security_group_name: "molecule-{{ run_config.run_id }}" default_security_group_description: Ephemeral security group for Molecule instances @@ -123,7 +124,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_repo/molecule/default/destroy.yml b/roles/cm_repo/molecule/default/destroy.yml index fb95a201..a090fe0b 100644 --- a/roles/cm_repo/molecule/default/destroy.yml +++ b/roles/cm_repo/molecule/default/destroy.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" @@ -69,7 +70,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_repo/molecule/default/molecule.yml b/roles/cm_repo/molecule/default/molecule.yml index 41a7fb7d..77af156b 100644 --- a/roles/cm_repo/molecule/default/molecule.yml +++ b/roles/cm_repo/molecule/default/molecule.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,19 +38,19 @@ platforms: tags: Name: rhel9-4.cm_repo.molecule Project: Molecule testing for cm_repo - # - name: rhel8-10.molecule.internal # Enable once prereq_supported matrix is expanded - # image_owner: "309956199498" - # image_name: RHEL-8.10.0_HVM-* - # image_filters: - # architecture: x86_64 - # instance_type: t3.medium - # boot_wait_seconds: 15 - # vpc_subnet_id: ${TEST_VPC_SUBNET_ID} - # groups: - # - redhat - # tags: - # Name: rhel8-10.cm_repo.molecule - # Project: Molecule testing for cm_repo +# - name: rhel8-10.molecule.internal # Enable once prereq_supported matrix is expanded +# image_owner: "309956199498" +# image_name: RHEL-8.10.0_HVM-* +# image_filters: +# architecture: x86_64 +# instance_type: t3.medium +# boot_wait_seconds: 15 +# vpc_subnet_id: ${TEST_VPC_SUBNET_ID} +# groups: +# - redhat +# tags: +# Name: rhel8-10.cm_repo.molecule +# Project: Molecule testing for cm_repo provisioner: name: ansible inventory: diff --git a/roles/cm_repo/molecule/default/requirements.yml b/roles/cm_repo/molecule/default/requirements.yml index 5a6d5219..0d4d942e 100644 --- a/roles/cm_repo/molecule/default/requirements.yml +++ b/roles/cm_repo/molecule/default/requirements.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/molecule/default/verify.yml b/roles/cm_repo/molecule/default/verify.yml index e55aede0..0cd23ad5 100644 --- a/roles/cm_repo/molecule/default/verify.yml +++ b/roles/cm_repo/molecule/default/verify.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/tasks/RedHat.yml b/roles/cm_repo/tasks/RedHat.yml index 3014b7a8..eff05ca1 100644 --- a/roles/cm_repo/tasks/RedHat.yml +++ b/roles/cm_repo/tasks/RedHat.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/tasks/main.yml b/roles/cm_repo/tasks/main.yml index 2f0e4a04..53280136 100644 --- a/roles/cm_repo/tasks/main.yml +++ b/roles/cm_repo/tasks/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/vars/RedHat-CM5.yml b/roles/cm_repo/vars/RedHat-CM5.yml index 229ccc4c..833d46b2 100644 --- a/roles/cm_repo/vars/RedHat-CM5.yml +++ b/roles/cm_repo/vars/RedHat-CM5.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/vars/RedHat-CM6.yml b/roles/cm_repo/vars/RedHat-CM6.yml index b0c4ffc9..420844ef 100644 --- a/roles/cm_repo/vars/RedHat-CM6.yml +++ b/roles/cm_repo/vars/RedHat-CM6.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/vars/RedHat.yml b/roles/cm_repo/vars/RedHat.yml index f0b357d5..fe8bd294 100644 --- a/roles/cm_repo/vars/RedHat.yml +++ b/roles/cm_repo/vars/RedHat.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_repo/vars/main.yml b/roles/cm_repo/vars/main.yml index 97273149..30fde109 100644 --- a/roles/cm_repo/vars/main.yml +++ b/roles/cm_repo/vars/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/defaults/main.yml b/roles/cm_server/defaults/main.yml index ce5bc37b..e46dbfb7 100644 --- a/roles/cm_server/defaults/main.yml +++ b/roles/cm_server/defaults/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/handlers/main.yml b/roles/cm_server/handlers/main.yml index 2069c8fc..b8386fd9 100644 --- a/roles/cm_server/handlers/main.yml +++ b/roles/cm_server/handlers/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/meta/argument_specs.yml b/roles/cm_server/meta/argument_specs.yml index 60a24df0..748214b2 100644 --- a/roles/cm_server/meta/argument_specs.yml +++ b/roles/cm_server/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/molecule/default/converge.yml b/roles/cm_server/molecule/default/converge.yml index 85368eb9..6e3c3ff1 100644 --- a/roles/cm_server/molecule/default/converge.yml +++ b/roles/cm_server/molecule/default/converge.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/molecule/default/create.yml b/roles/cm_server/molecule/default/create.yml index 132438bf..41583e5e 100644 --- a/roles/cm_server/molecule/default/create.yml +++ b/roles/cm_server/molecule/default/create.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_assign_public_ip: true @@ -38,7 +39,7 @@ default_public_key_path: "{{ default_private_key_path }}.pub" default_ssh_user: ansible default_ssh_port: 22 - default_user_data: '' + default_user_data: "" default_security_group_name: "molecule-{{ run_config.run_id }}" default_security_group_description: Ephemeral security group for Molecule instances @@ -123,7 +124,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_server/molecule/default/destroy.yml b/roles/cm_server/molecule/default/destroy.yml index fb95a201..a090fe0b 100644 --- a/roles/cm_server/molecule/default/destroy.yml +++ b/roles/cm_server/molecule/default/destroy.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" @@ -69,7 +70,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/cm_server/molecule/default/molecule.yml b/roles/cm_server/molecule/default/molecule.yml index 5029d540..cc00bda8 100644 --- a/roles/cm_server/molecule/default/molecule.yml +++ b/roles/cm_server/molecule/default/molecule.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -37,19 +38,19 @@ platforms: tags: Name: rhel9-4.cm_server.molecule Project: Molecule testing for cm_server - # - name: rhel8-10.molecule.internal # Enable once prereq_supported matrix is expanded - # image_owner: "309956199498" - # image_name: RHEL-8.10.0_HVM-* - # image_filters: - # architecture: x86_64 - # instance_type: t3.medium - # boot_wait_seconds: 15 - # vpc_subnet_id: ${TEST_VPC_SUBNET_ID} - # groups: - # - redhat - # tags: - # Name: rhel8-10.cm_repo.molecule - # Project: Molecule testing for cm_repo +# - name: rhel8-10.molecule.internal # Enable once prereq_supported matrix is expanded +# image_owner: "309956199498" +# image_name: RHEL-8.10.0_HVM-* +# image_filters: +# architecture: x86_64 +# instance_type: t3.medium +# boot_wait_seconds: 15 +# vpc_subnet_id: ${TEST_VPC_SUBNET_ID} +# groups: +# - redhat +# tags: +# Name: rhel8-10.cm_repo.molecule +# Project: Molecule testing for cm_repo provisioner: name: ansible inventory: diff --git a/roles/cm_server/molecule/default/prepare.yml b/roles/cm_server/molecule/default/prepare.yml index e0d8fbd5..94a9c1c9 100644 --- a/roles/cm_server/molecule/default/prepare.yml +++ b/roles/cm_server/molecule/default/prepare.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -41,6 +42,7 @@ community.general.postgresql_user: name: scm password: testpassword + become: true become_user: postgres - name: Set up Cloudera Manager database @@ -48,4 +50,5 @@ name: scm owner: scm encoding: UTF-8 + become: true become_user: postgres diff --git a/roles/cm_server/molecule/default/requirements.yml b/roles/cm_server/molecule/default/requirements.yml index 5a6d5219..0d4d942e 100644 --- a/roles/cm_server/molecule/default/requirements.yml +++ b/roles/cm_server/molecule/default/requirements.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/molecule/default/verify.yml b/roles/cm_server/molecule/default/verify.yml index a0e5ccfb..1c56f2b0 100644 --- a/roles/cm_server/molecule/default/verify.yml +++ b/roles/cm_server/molecule/default/verify.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/cm_server/tasks/main.yml b/roles/cm_server/tasks/main.yml index 2f6aa6de..b6ec5298 100644 --- a/roles/cm_server/tasks/main.yml +++ b/roles/cm_server/tasks/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 7e247d46..b4bb6b0c 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2023 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/dynamic_inventory/tasks/parse_inventory_template.yml b/roles/dynamic_inventory/tasks/parse_inventory_template.yml index 6f1c5801..38d4965e 100644 --- a/roles/dynamic_inventory/tasks/parse_inventory_template.yml +++ b/roles/dynamic_inventory/tasks/parse_inventory_template.yml @@ -1,12 +1,10 @@ --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: msg: "Role, {{ ansible_role_name }}, is no longer supported." version: 4.0.0 - # Read in Dynamic Inventory - name: Seek Inventory Template in Definition Path register: __di_template_stat diff --git a/roles/grafana/meta/argument_specs.yml b/roles/grafana/meta/argument_specs.yml index 41bc7d62..1e5e5902 100644 --- a/roles/grafana/meta/argument_specs.yml +++ b/roles/grafana/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/grafana/tasks/CentOS.yml b/roles/grafana/tasks/CentOS.yml index 12d85282..c5e4d413 100644 --- a/roles/grafana/tasks/CentOS.yml +++ b/roles/grafana/tasks/CentOS.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Import Grafana GPG key ansible.builtin.rpm_key: state: present diff --git a/roles/grafana/tasks/Ubuntu.yml b/roles/grafana/tasks/Ubuntu.yml index fa91b744..ae739d3b 100644 --- a/roles/grafana/tasks/Ubuntu.yml +++ b/roles/grafana/tasks/Ubuntu.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Update APT package cache ansible.builtin.apt: update_cache: true diff --git a/roles/grafana/tasks/main.yml b/roles/grafana/tasks/main.yml index 698971ff..ab844b47 100644 --- a/roles/grafana/tasks/main.yml +++ b/roles/grafana/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Load OS-specific Grafana variables ansible.builtin.include_vars: "{{ ansible_facts['distribution'] }}.yml" diff --git a/roles/mount/defaults/main.yml b/roles/mount/defaults/main.yml index 9ad40656..eea0ddc4 100644 --- a/roles/mount/defaults/main.yml +++ b/roles/mount/defaults/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/mount/meta/argument_specs.yml b/roles/mount/meta/argument_specs.yml index 26c90595..04dcb99e 100644 --- a/roles/mount/meta/argument_specs.yml +++ b/roles/mount/meta/argument_specs.yml @@ -57,4 +57,3 @@ argument_specs: required: false choices: - aws -... diff --git a/roles/mount/tasks/main.yml b/roles/mount/tasks/main.yml index 5adca01a..0fa609ab 100644 --- a/roles/mount/tasks/main.yml +++ b/roles/mount/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Generate map of EBS volume attachments when: mount_provider is defined and mount_provider == 'aws' block: @@ -78,5 +77,3 @@ loop_control: loop_var: volume label: "{{ volume.device }}" - -... diff --git a/roles/mount/tasks/volume.yml b/roles/mount/tasks/volume.yml index 031f175a..808bd914 100644 --- a/roles/mount/tasks/volume.yml +++ b/roles/mount/tasks/volume.yml @@ -44,5 +44,3 @@ src: "{{ '/'.join(['/dev', volume.vg_name, volume.lv_name]) }}" fstype: "{{ volume.fstype | default(mount_fstype) }}" state: mounted - -... diff --git a/roles/node_exporter/handlers/main.yml b/roles/node_exporter/handlers/main.yml index 643f82d3..5b46b972 100644 --- a/roles/node_exporter/handlers/main.yml +++ b/roles/node_exporter/handlers/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Start node_exporter service block: - name: Reload systemd daemon diff --git a/roles/node_exporter/tasks/main.yml b/roles/node_exporter/tasks/main.yml index f0b09556..0cb29048 100644 --- a/roles/node_exporter/tasks/main.yml +++ b/roles/node_exporter/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Create nodeexporter group ansible.builtin.user: name: "{{ node_exporter_group }}" diff --git a/roles/prereq_activitymonitor/molecule/default/prepare.yml b/roles/prereq_activitymonitor/molecule/default/prepare.yml index 2dcd1235..436bb123 100644 --- a/roles/prereq_activitymonitor/molecule/default/prepare.yml +++ b/roles/prereq_activitymonitor/molecule/default/prepare.yml @@ -18,15 +18,17 @@ gather_facts: true become: true tasks: - - block: + - name: PostgreSQL + when: database_type == 'postgresql' + block: - name: Install Postgresql server ansible.builtin.import_role: - name: postgresql_server + name: cloudera.exe.postgresql_server - name: Create superuser community.postgresql.postgresql_user: role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres - when: database_type == 'postgresql' diff --git a/roles/prereq_database/molecule/default/prepare.yml b/roles/prereq_database/molecule/default/prepare.yml index 686e92ed..f7c8913f 100644 --- a/roles/prereq_database/molecule/default/prepare.yml +++ b/roles/prereq_database/molecule/default/prepare.yml @@ -18,15 +18,17 @@ gather_facts: true become: true tasks: - - block: + - name: PostgreSQL + when: database_type == 'postgresql' + block: - name: Install Postgresql server ansible.builtin.import_role: - name: postgresql_server + name: cloudera.exe.postgresql_server - name: Create superuser community.postgresql.postgresql_user: role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres - when: database_type == 'postgresql' diff --git a/roles/prereq_dataviz_database/molecule/default/prepare.yml b/roles/prereq_dataviz_database/molecule/default/prepare.yml index 5a827558..6dcfb94e 100644 --- a/roles/prereq_dataviz_database/molecule/default/prepare.yml +++ b/roles/prereq_dataviz_database/molecule/default/prepare.yml @@ -18,15 +18,17 @@ gather_facts: true become: true tasks: - - block: + - name: PostgreSQL + when: database_type == 'postgresql' + block: - name: Install Postgresql server ansible.builtin.import_role: - name: postgresql_server + name: cloudera.exe.postgresql_server - name: Create superuser community.postgresql.postgresql_user: role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres - when: database_type == 'postgresql' diff --git a/roles/prereq_ecs/meta/argument_specs.yml b/roles/prereq_ecs/meta/argument_specs.yml index 0d4ce19f..f50f4d83 100644 --- a/roles/prereq_ecs/meta/argument_specs.yml +++ b/roles/prereq_ecs/meta/argument_specs.yml @@ -17,8 +17,8 @@ argument_specs: main: short_description: Set up user accounts, firewall, and networking for ECS description: - - Set up for Cloudera Embedded Container Service (ECS) usage including creation of required local users and configuration - of firewall and networking configuration. + - Set up for Cloudera Embedded Container Service (ECS) usage including creation of required local users and configuration of firewall and networking + configuration. - The list of local users are taken from the P(cloudera.exe.prereq_cloudera_manager#role) role. author: Cloudera Labs version_added: "3.0.0" diff --git a/roles/prereq_hive_database/molecule/default/prepare.yml b/roles/prereq_hive_database/molecule/default/prepare.yml index 2dcd1235..961c0fa6 100644 --- a/roles/prereq_hive_database/molecule/default/prepare.yml +++ b/roles/prereq_hive_database/molecule/default/prepare.yml @@ -18,7 +18,9 @@ gather_facts: true become: true tasks: - - block: + - name: PostgreSQL + when: database_type == 'postgresql' + block: - name: Install Postgresql server ansible.builtin.import_role: name: postgresql_server @@ -28,5 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres - when: database_type == 'postgresql' diff --git a/roles/prereq_hue_database/molecule/default/prepare.yml b/roles/prereq_hue_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_hue_database/molecule/default/prepare.yml +++ b/roles/prereq_hue_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_kernel/meta/argument_specs.yml b/roles/prereq_kernel/meta/argument_specs.yml index 2a981ae9..bf718279 100644 --- a/roles/prereq_kernel/meta/argument_specs.yml +++ b/roles/prereq_kernel/meta/argument_specs.yml @@ -18,8 +18,7 @@ argument_specs: short_description: Update OS kernel parameters for deployments description: - Updates and applies kernel parameters using C(sysctl). - - This includes controlling memory management (swappiness and memory overcommit) - and configuring IPv6 settings to disable IPv6 functionality. + - This includes controlling memory management (swappiness and memory overcommit) and configuring IPv6 settings to disable IPv6 functionality. author: - "Ronald Suplina " version_added: "3.0.0" diff --git a/roles/prereq_knox_database/meta/argument_specs.yml b/roles/prereq_knox_database/meta/argument_specs.yml index 3a5ea994..bad9559b 100644 --- a/roles/prereq_knox_database/meta/argument_specs.yml +++ b/roles/prereq_knox_database/meta/argument_specs.yml @@ -18,8 +18,8 @@ argument_specs: short_description: Set up database and user accounts for Knox description: - Set up the Apache Knox database and its associated user accounts, ensuring proper configuration for Knox operations. - - Default values are used for the username, password, and database name, but these can be overwritten by setting the O(knox_username), O(knox_password), and - O(knox_database) variables. + - Default values are used for the username, password, and database name, but these can be overwritten by setting the O(knox_username), O(knox_password), + and O(knox_database) variables. author: Cloudera Labs version_added: "3.0.0" options: diff --git a/roles/prereq_knox_database/molecule/default/prepare.yml b/roles/prereq_knox_database/molecule/default/prepare.yml index a33a4190..6dcfb94e 100644 --- a/roles/prereq_knox_database/molecule/default/prepare.yml +++ b/roles/prereq_knox_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_oozie_database/molecule/default/prepare.yml b/roles/prereq_oozie_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_oozie_database/molecule/default/prepare.yml +++ b/roles/prereq_oozie_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_query_processor_database/molecule/default/prepare.yml b/roles/prereq_query_processor_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_query_processor_database/molecule/default/prepare.yml +++ b/roles/prereq_query_processor_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_ranger_database/molecule/default/prepare.yml b/roles/prereq_ranger_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_ranger_database/molecule/default/prepare.yml +++ b/roles/prereq_ranger_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_reportsmanager/molecule/default/prepare.yml b/roles/prereq_reportsmanager/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_reportsmanager/molecule/default/prepare.yml +++ b/roles/prereq_reportsmanager/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_schemaregistry_database/molecule/default/prepare.yml b/roles/prereq_schemaregistry_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_schemaregistry_database/molecule/default/prepare.yml +++ b/roles/prereq_schemaregistry_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_smm_database/defaults/main.yml b/roles/prereq_smm_database/defaults/main.yml index 7f237e25..802f9711 100644 --- a/roles/prereq_smm_database/defaults/main.yml +++ b/roles/prereq_smm_database/defaults/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - - database_type: "{{ undef(hint='Please defined the database type.') }}" database_host: "{{ undef(hint='Please defined the database server hostname or IP address.') }}" # database_port: diff --git a/roles/prereq_smm_database/meta/argument_specs.yml b/roles/prereq_smm_database/meta/argument_specs.yml index 50916d09..c1c90751 100644 --- a/roles/prereq_smm_database/meta/argument_specs.yml +++ b/roles/prereq_smm_database/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,8 +18,8 @@ argument_specs: short_description: Set up database and user accounts for Streams Messaging Manager description: - Set up the Streams Messaging Manager database and its associated user accounts, ensuring proper configuration for Streams Messaging Manager operations. - - Default values are used for the username, password, and database name, but these can be overwritten by setting the O(smm_username), O(smm_password), - and I(smm_database) variables. + - Default values are used for the username, password, and database name, but these can be overwritten by setting the O(smm_username), O(smm_password), and + I(smm_database) variables. author: Cloudera Labs version_added: "3.0.0" options: diff --git a/roles/prereq_smm_database/molecule/default/converge.yml b/roles/prereq_smm_database/molecule/default/converge.yml index 55ffd439..ca1f6c8e 100644 --- a/roles/prereq_smm_database/molecule/default/converge.yml +++ b/roles/prereq_smm_database/molecule/default/converge.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +15,8 @@ - name: Converge hosts: all - gather_facts: no - become: yes + gather_facts: false + become: true tasks: - name: Create Streams Messaging Manager database and configure its associated user account. ansible.builtin.import_role: diff --git a/roles/prereq_smm_database/molecule/default/create.yml b/roles/prereq_smm_database/molecule/default/create.yml index 132438bf..41583e5e 100644 --- a/roles/prereq_smm_database/molecule/default/create.yml +++ b/roles/prereq_smm_database/molecule/default/create.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_assign_public_ip: true @@ -38,7 +39,7 @@ default_public_key_path: "{{ default_private_key_path }}.pub" default_ssh_user: ansible default_ssh_port: 22 - default_user_data: '' + default_user_data: "" default_security_group_name: "molecule-{{ run_config.run_id }}" default_security_group_description: Ephemeral security group for Molecule instances @@ -123,7 +124,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/prereq_smm_database/molecule/default/destroy.yml b/roles/prereq_smm_database/molecule/default/destroy.yml index fb95a201..a090fe0b 100644 --- a/roles/prereq_smm_database/molecule/default/destroy.yml +++ b/roles/prereq_smm_database/molecule/default/destroy.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,7 +26,7 @@ run_config_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/run-config.yml" run_config_from_file: "{{ (lookup('file', run_config_path, errors='ignore') or '{}') | from_yaml }}" - run_config: '{{ default_run_config | combine(run_config_from_file) }}' + run_config: "{{ default_run_config | combine(run_config_from_file) }}" # Platform settings handling default_aws_profile: "{{ lookup('env', 'AWS_PROFILE') }}" @@ -69,7 +70,7 @@ - platform.vpc_id is string - platform.vpc_subnet_id is string and platform.vpc_subnet_id | length > 0 quiet: true - loop: '{{ platforms }}' + loop: "{{ platforms }}" loop_control: loop_var: platform label: "{{ platform.name }}" diff --git a/roles/prereq_smm_database/molecule/default/molecule.yml b/roles/prereq_smm_database/molecule/default/molecule.yml index 4b162974..2401d4de 100644 --- a/roles/prereq_smm_database/molecule/default/molecule.yml +++ b/roles/prereq_smm_database/molecule/default/molecule.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/prereq_smm_database/molecule/default/prepare.yml b/roles/prereq_smm_database/molecule/default/prepare.yml index 8950648c..436bb123 100644 --- a/roles/prereq_smm_database/molecule/default/prepare.yml +++ b/roles/prereq_smm_database/molecule/default/prepare.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,8 +15,8 @@ - name: Setup database and configure superuser hosts: all - gather_facts: yes - become: yes + gather_facts: true + become: true tasks: - name: PostgreSQL when: database_type == 'postgresql' @@ -29,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prereq_smm_database/molecule/default/requirements.yml b/roles/prereq_smm_database/molecule/default/requirements.yml index 3ce89d9d..a991f5d6 100644 --- a/roles/prereq_smm_database/molecule/default/requirements.yml +++ b/roles/prereq_smm_database/molecule/default/requirements.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/prereq_smm_database/molecule/default/verify.yml b/roles/prereq_smm_database/molecule/default/verify.yml index 08c243ef..4dc96acf 100644 --- a/roles/prereq_smm_database/molecule/default/verify.yml +++ b/roles/prereq_smm_database/molecule/default/verify.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +15,7 @@ - name: Verify that users and databases are present hosts: all - gather_facts: no + gather_facts: false tasks: - name: PostgreSQL when: database_type == 'postgresql' diff --git a/roles/prereq_smm_database/tasks/main.yml b/roles/prereq_smm_database/tasks/main.yml index c6d8d72e..204bac51 100644 --- a/roles/prereq_smm_database/tasks/main.yml +++ b/roles/prereq_smm_database/tasks/main.yml @@ -1,3 +1,4 @@ +--- # Copyright 2024 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,8 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - - - name: Provision databases and user accounts ansible.builtin.import_role: name: cloudera.exe.prereq_database diff --git a/roles/prereq_ssb_database/molecule/default/prepare.yml b/roles/prereq_ssb_database/molecule/default/prepare.yml index 0cac8287..436bb123 100644 --- a/roles/prereq_ssb_database/molecule/default/prepare.yml +++ b/roles/prereq_ssb_database/molecule/default/prepare.yml @@ -30,4 +30,5 @@ role_attr_flags: SUPERUSER name: "{{ database_admin_user }}" password: "{{ database_admin_password }}" + become: true become_user: postgres diff --git a/roles/prometheus/handlers/main.yml b/roles/prometheus/handlers/main.yml index 12fd25f3..cd84c26a 100644 --- a/roles/prometheus/handlers/main.yml +++ b/roles/prometheus/handlers/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Enable Prometheus block: - name: Reload systemd daemon diff --git a/roles/prometheus/meta/argument_specs.yml b/roles/prometheus/meta/argument_specs.yml index f6293691..3efff1b6 100644 --- a/roles/prometheus/meta/argument_specs.yml +++ b/roles/prometheus/meta/argument_specs.yml @@ -1,3 +1,4 @@ +--- # Copyright 2025 Cloudera, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index e056cc89..f37a942e 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Create Prometheus directory ansible.builtin.file: path: "{{ prometheus_directory }}" diff --git a/roles/provision/tasks/main.yml b/roles/provision/tasks/main.yml index c1379fe5..3d099761 100644 --- a/roles/provision/tasks/main.yml +++ b/roles/provision/tasks/main.yml @@ -1,5 +1,4 @@ --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/rdbms/client/mysql_connector/tasks/main.yml b/roles/rdbms/client/mysql_connector/tasks/main.yml index ee16bbb3..c26806c7 100644 --- a/roles/rdbms/client/mysql_connector/tasks/main.yml +++ b/roles/rdbms/client/mysql_connector/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/rdbms/client/oracle_connector/tasks/main.yml b/roles/rdbms/client/oracle_connector/tasks/main.yml index d83a557e..c87e4ddc 100644 --- a/roles/rdbms/client/oracle_connector/tasks/main.yml +++ b/roles/rdbms/client/oracle_connector/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/rdbms/client/postgresql_connector/tasks/main.yml b/roles/rdbms/client/postgresql_connector/tasks/main.yml index 349cd007..c6d4ea16 100644 --- a/roles/rdbms/client/postgresql_connector/tasks/main.yml +++ b/roles/rdbms/client/postgresql_connector/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/rdbms/server/tasks/main.yml b/roles/rdbms/server/tasks/main.yml index c3637e16..e1b16322 100644 --- a/roles/rdbms/server/tasks/main.yml +++ b/roles/rdbms/server/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: diff --git a/roles/rdbms_server/tasks/main.yml b/roles/rdbms_server/tasks/main.yml index c3637e16..e1b16322 100644 --- a/roles/rdbms_server/tasks/main.yml +++ b/roles/rdbms_server/tasks/main.yml @@ -13,7 +13,6 @@ # limitations under the License. --- - - name: Deprecation warning run_once: true cloudera.exe.deprecation: