diff --git a/.yamllint b/.yamllint new file mode 100644 index 00000000..a4e85c3d --- /dev/null +++ b/.yamllint @@ -0,0 +1,41 @@ +--- + +# Copyright 2025 Cloudera, Inc. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# 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. + +extends: default +rules: + comments: + # https://github.com/prettier/prettier/issues/6780 + min-spaces-from-content: 1 + # https://github.com/adrienverge/yamllint/issues/384 + comments-indentation: false + document-start: disable + # 160 chars was the default used by old E204 rule, but + # you can easily change it or disable in your .yamllint file. + line-length: + max: 200 + # We are adding an extra space inside braces as that's how prettier does it + # and we are trying not to fight other linters. + braces: + min-spaces-inside: 0 # yamllint defaults to 0 + max-spaces-inside: 1 # yamllint defaults to 0 + # key-duplicates: + # forbid-duplicated-merge-keys: true # not enabled by default + octal-values: + forbid-implicit-octal: true # yamllint defaults to false + forbid-explicit-octal: true # yamllint defaults to false + # quoted-strings: + # quote-type: double + # required: only-when-needed diff --git a/roles/auto_repo_mirror/tasks/parse_definition_for_mirror_targets.yml b/roles/auto_repo_mirror/tasks/parse_definition_for_mirror_targets.yml index 236d31df..df421703 100644 --- a/roles/auto_repo_mirror/tasks/parse_definition_for_mirror_targets.yml +++ b/roles/auto_repo_mirror/tasks/parse_definition_for_mirror_targets.yml @@ -109,7 +109,7 @@ failed_when: - __auto_repo_mirror_lookup_initial.s3_keys is not defined - "'cannot be found' not in __auto_repo_mirror_lookup_initial.msg" - amazon.aws.aws_s3: + amazon.aws.s3_object: bucket: "{{ init__auto_repo_mirror_bucket_name }}" mode: list diff --git a/roles/auto_repo_mirror/tasks/update_mirror_cache.yml b/roles/auto_repo_mirror/tasks/update_mirror_cache.yml index 252764d6..6b4de757 100644 --- a/roles/auto_repo_mirror/tasks/update_mirror_cache.yml +++ b/roles/auto_repo_mirror/tasks/update_mirror_cache.yml @@ -13,7 +13,7 @@ failed_when: - __auto_repo_mirror_lookup_initial.s3_keys is not defined - "'cannot be found' not in __auto_repo_mirror_lookup_initial.msg" - amazon.aws.aws_s3: + amazon.aws.s3_object: bucket: "{{ init__auto_repo_mirror_bucket_name }}" mode: list diff --git a/roles/infrastructure/tasks/initialize_teardown_aws.yml b/roles/infrastructure/tasks/initialize_teardown_aws.yml index a552d03d..4ea7109e 100644 --- a/roles/infrastructure/tasks/initialize_teardown_aws.yml +++ b/roles/infrastructure/tasks/initialize_teardown_aws.yml @@ -128,7 +128,7 @@ - name: List all AWS VPC Security Groups register: __infra_aws_sgs - amazon.aws.ec2_group_info: + amazon.aws.ec2_security_group_info: region: "{{ infra__region }}" filters: vpc-id: "{{ infra__aws_vpc_id }}" diff --git a/roles/infrastructure/tasks/setup_aws_network.yml b/roles/infrastructure/tasks/setup_aws_network.yml index 7f3e5677..34aaf955 100644 --- a/roles/infrastructure/tasks/setup_aws_network.yml +++ b/roles/infrastructure/tasks/setup_aws_network.yml @@ -229,7 +229,7 @@ rule_desc: "Extra access CIDR blocks" - name: Create AWS Security Groups - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: state: present region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" @@ -260,7 +260,7 @@ when: infra__aws_private_endpoints | bool block: - name: Create VPC Endpoint Security Group (Skip if infra__aws_private_endpoints is false) - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: state: present region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" @@ -319,7 +319,7 @@ register: __aws_interface_vpc_endpoints - name: List Default Security Group for VPC (Skip if infra__aws_private_endpoints is false) - amazon.aws.ec2_group_info: + amazon.aws.ec2_security_group_info: filters: vpc-id: "{{ infra__aws_vpc_id }}" group-name: diff --git a/roles/infrastructure/tasks/setup_aws_storage.yml b/roles/infrastructure/tasks/setup_aws_storage.yml index 19ec7ddc..aaa50271 100644 --- a/roles/infrastructure/tasks/setup_aws_storage.yml +++ b/roles/infrastructure/tasks/setup_aws_storage.yml @@ -42,7 +42,7 @@ register: __infra_aws_storage_locations_info - name: Create AWS Buckets directory structures - amazon.aws.aws_s3: + amazon.aws.s3_object: region: "{{ infra__region }}" bucket: "{{ __aws_storage_object_item.bucket }}" object: "{{ __aws_storage_object_item.path }}" diff --git a/roles/infrastructure/tasks/teardown_aws_network.yml b/roles/infrastructure/tasks/teardown_aws_network.yml index 5dcf15d8..2e41af56 100644 --- a/roles/infrastructure/tasks/teardown_aws_network.yml +++ b/roles/infrastructure/tasks/teardown_aws_network.yml @@ -20,7 +20,7 @@ - not infra__force_teardown block: - name: Remove AWS Security Group resources - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" name: "{{ __security_group_name_item }}" @@ -147,7 +147,7 @@ block: - name: Clean rules for discovered AWS Security Groups when: __security_group_rule_item.group_name != 'default' - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" name: "{{ __security_group_rule_item.group_name }}" @@ -162,7 +162,7 @@ - name: Remove discovered AWS Security Groups when: __security_group_purge_item.group_name != 'default' - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" name: "{{ __security_group_purge_item.group_name }}" @@ -235,7 +235,7 @@ delay: 10 - name: Delete VPC Endpoint Security Group - amazon.aws.ec2_group: + amazon.aws.ec2_security_group: region: "{{ infra__region }}" vpc_id: "{{ infra__aws_vpc_id }}" name: "{{ infra__security_group_vpce_name }}"