Skip to content

Commit 67b006d

Browse files
authored
Add yamllint config (#277)
* Migrate to latest AWS modules * Add yamllint configuration file Signed-off-by: Webster Mudge <[email protected]>
1 parent 17bc0a3 commit 67b006d

File tree

7 files changed

+52
-11
lines changed

7 files changed

+52
-11
lines changed

.yamllint

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
3+
# Copyright 2025 Cloudera, Inc. All Rights Reserved.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
extends: default
18+
rules:
19+
comments:
20+
# https://github.com/prettier/prettier/issues/6780
21+
min-spaces-from-content: 1
22+
# https://github.com/adrienverge/yamllint/issues/384
23+
comments-indentation: false
24+
document-start: disable
25+
# 160 chars was the default used by old E204 rule, but
26+
# you can easily change it or disable in your .yamllint file.
27+
line-length:
28+
max: 200
29+
# We are adding an extra space inside braces as that's how prettier does it
30+
# and we are trying not to fight other linters.
31+
braces:
32+
min-spaces-inside: 0 # yamllint defaults to 0
33+
max-spaces-inside: 1 # yamllint defaults to 0
34+
# key-duplicates:
35+
# forbid-duplicated-merge-keys: true # not enabled by default
36+
octal-values:
37+
forbid-implicit-octal: true # yamllint defaults to false
38+
forbid-explicit-octal: true # yamllint defaults to false
39+
# quoted-strings:
40+
# quote-type: double
41+
# required: only-when-needed

roles/auto_repo_mirror/tasks/parse_definition_for_mirror_targets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
failed_when:
110110
- __auto_repo_mirror_lookup_initial.s3_keys is not defined
111111
- "'cannot be found' not in __auto_repo_mirror_lookup_initial.msg"
112-
amazon.aws.aws_s3:
112+
amazon.aws.s3_object:
113113
bucket: "{{ init__auto_repo_mirror_bucket_name }}"
114114
mode: list
115115

roles/auto_repo_mirror/tasks/update_mirror_cache.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
failed_when:
1414
- __auto_repo_mirror_lookup_initial.s3_keys is not defined
1515
- "'cannot be found' not in __auto_repo_mirror_lookup_initial.msg"
16-
amazon.aws.aws_s3:
16+
amazon.aws.s3_object:
1717
bucket: "{{ init__auto_repo_mirror_bucket_name }}"
1818
mode: list
1919

roles/infrastructure/tasks/initialize_teardown_aws.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128

129129
- name: List all AWS VPC Security Groups
130130
register: __infra_aws_sgs
131-
amazon.aws.ec2_group_info:
131+
amazon.aws.ec2_security_group_info:
132132
region: "{{ infra__region }}"
133133
filters:
134134
vpc-id: "{{ infra__aws_vpc_id }}"

roles/infrastructure/tasks/setup_aws_network.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@
229229
rule_desc: "Extra access CIDR blocks"
230230

231231
- name: Create AWS Security Groups
232-
amazon.aws.ec2_group:
232+
amazon.aws.ec2_security_group:
233233
state: present
234234
region: "{{ infra__region }}"
235235
vpc_id: "{{ infra__aws_vpc_id }}"
@@ -260,7 +260,7 @@
260260
when: infra__aws_private_endpoints | bool
261261
block:
262262
- name: Create VPC Endpoint Security Group (Skip if infra__aws_private_endpoints is false)
263-
amazon.aws.ec2_group:
263+
amazon.aws.ec2_security_group:
264264
state: present
265265
region: "{{ infra__region }}"
266266
vpc_id: "{{ infra__aws_vpc_id }}"
@@ -319,7 +319,7 @@
319319
register: __aws_interface_vpc_endpoints
320320

321321
- name: List Default Security Group for VPC (Skip if infra__aws_private_endpoints is false)
322-
amazon.aws.ec2_group_info:
322+
amazon.aws.ec2_security_group_info:
323323
filters:
324324
vpc-id: "{{ infra__aws_vpc_id }}"
325325
group-name:

roles/infrastructure/tasks/setup_aws_storage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
register: __infra_aws_storage_locations_info
4343

4444
- name: Create AWS Buckets directory structures
45-
amazon.aws.aws_s3:
45+
amazon.aws.s3_object:
4646
region: "{{ infra__region }}"
4747
bucket: "{{ __aws_storage_object_item.bucket }}"
4848
object: "{{ __aws_storage_object_item.path }}"

roles/infrastructure/tasks/teardown_aws_network.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- not infra__force_teardown
2121
block:
2222
- name: Remove AWS Security Group resources
23-
amazon.aws.ec2_group:
23+
amazon.aws.ec2_security_group:
2424
region: "{{ infra__region }}"
2525
vpc_id: "{{ infra__aws_vpc_id }}"
2626
name: "{{ __security_group_name_item }}"
@@ -147,7 +147,7 @@
147147
block:
148148
- name: Clean rules for discovered AWS Security Groups
149149
when: __security_group_rule_item.group_name != 'default'
150-
amazon.aws.ec2_group:
150+
amazon.aws.ec2_security_group:
151151
region: "{{ infra__region }}"
152152
vpc_id: "{{ infra__aws_vpc_id }}"
153153
name: "{{ __security_group_rule_item.group_name }}"
@@ -162,7 +162,7 @@
162162

163163
- name: Remove discovered AWS Security Groups
164164
when: __security_group_purge_item.group_name != 'default'
165-
amazon.aws.ec2_group:
165+
amazon.aws.ec2_security_group:
166166
region: "{{ infra__region }}"
167167
vpc_id: "{{ infra__aws_vpc_id }}"
168168
name: "{{ __security_group_purge_item.group_name }}"
@@ -235,7 +235,7 @@
235235
delay: 10
236236

237237
- name: Delete VPC Endpoint Security Group
238-
amazon.aws.ec2_group:
238+
amazon.aws.ec2_security_group:
239239
region: "{{ infra__region }}"
240240
vpc_id: "{{ infra__aws_vpc_id }}"
241241
name: "{{ infra__security_group_vpce_name }}"

0 commit comments

Comments
 (0)