Skip to content

Commit 1280686

Browse files
committed
added YAML linting
1 parent 022d0ce commit 1280686

16 files changed

Lines changed: 80 additions & 65 deletions

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
language: python
3+
python:
4+
- '2.7'
5+
install: 'pip install yamllint'
6+
script: 'yamllint .'

.yamllint

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
extends: default
3+
rules:
4+
indentation:
5+
indent-sequences: false
6+
line-length:
7+
max: 999
8+
comments:
9+
min-spaces-from-content: 1

ecs/cluster.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ Resources:
644644
content: |
645645
#!/usr/bin/env ruby
646646
# chkconfig: - 80 20
647-
APP_NAME = 'lifecycle-poller'
647+
APP_NAME = 'lifecycle-poller'
648648
APP_PATH = '/opt/lifecycle-poller/daemon.rb'
649649
case ARGV.first
650650
when 'start'
@@ -722,7 +722,7 @@ Resources:
722722
def isContainerInstanceIdle(containerInstanceId)
723723
ecs = Aws::ECS::Client.new()
724724
resp = ecs.list_tasks({
725-
cluster: $conf['cluster'],
725+
cluster: $conf['cluster'],
726726
container_instance: containerInstanceId
727727
})
728728
return resp.task_arns.empty?
@@ -742,9 +742,9 @@ Resources:
742742
def deregisterContainerInstance(containerInstanceId)
743743
ecs = Aws::ECS::Client.new()
744744
resp = ecs.deregister_container_instance({
745-
cluster: $conf['cluster'],
746-
container_instance: containerInstanceId,
747-
force: false
745+
cluster: $conf['cluster'],
746+
container_instance: containerInstanceId,
747+
force: false
748748
})
749749
end
750750
def completeLifecycleAction(token, hook, asg)

ecs/service-cluster-alb.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Conditions:
9595
Resources:
9696
TaskDefinition:
9797
Type: 'AWS::ECS::TaskDefinition'
98-
Properties:
98+
Properties:
9999
Family: !Ref 'AWS::StackName'
100100
NetworkMode: bridge
101101
ContainerDefinitions:
@@ -129,8 +129,8 @@ Resources:
129129
VpcId:
130130
'Fn::ImportValue': !Sub '${ParentClusterStack}-VPC'
131131
TargetGroupAttributes:
132-
- Key: deregistration_delay.timeout_seconds
133-
Value: !Ref LoadBalancerDeregistrationDelay
132+
- Key: deregistration_delay.timeout_seconds
133+
Value: !Ref LoadBalancerDeregistrationDelay
134134
LoadBalancerHttpListenerRule:
135135
Type: 'AWS::ElasticLoadBalancingV2::ListenerRule'
136136
Properties:
@@ -263,7 +263,7 @@ Resources:
263263
PolicyName: !Sub '${AWS::StackName}-scale-up'
264264
PolicyType: StepScaling
265265
ScalingTargetId: !Ref ScalableTarget
266-
StepScalingPolicyConfiguration:
266+
StepScalingPolicyConfiguration:
267267
AdjustmentType: PercentChangeInCapacity
268268
Cooldown: 300
269269
MinAdjustmentMagnitude: 1
@@ -276,7 +276,7 @@ Resources:
276276
PolicyName: !Sub '${AWS::StackName}-scale-down'
277277
PolicyType: StepScaling
278278
ScalingTargetId: !Ref ScalableTarget
279-
StepScalingPolicyConfiguration:
279+
StepScalingPolicyConfiguration:
280280
AdjustmentType: PercentChangeInCapacity
281281
Cooldown: 300
282282
MinAdjustmentMagnitude: 1
@@ -355,7 +355,7 @@ Outputs:
355355
Description: 'URL to the ECS service.' # TODO does not work with LoadBalancerHostPattern
356356
Value: !Sub
357357
- '${ClusterURL}/${LoadBalancerPath}/'
358-
- ClusterURL:
358+
- ClusterURL:
359359
'Fn::ImportValue': !Sub '${ParentClusterStack}-URL'
360360
LoadBalancerPath: !Ref LoadBalancerPath
361361
Export:

ecs/service-dedicated-alb.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Conditions:
9090
Resources:
9191
TaskDefinition:
9292
Type: 'AWS::ECS::TaskDefinition'
93-
Properties:
93+
Properties:
9494
Family: !Ref 'AWS::StackName'
9595
NetworkMode: bridge
9696
ContainerDefinitions:
@@ -177,8 +177,8 @@ Resources:
177177
VpcId:
178178
'Fn::ImportValue': !Sub '${ParentVPCStack}-VPC'
179179
TargetGroupAttributes:
180-
- Key: deregistration_delay.timeout_seconds
181-
Value: !Ref LoadBalancerDeregistrationDelay
180+
- Key: deregistration_delay.timeout_seconds
181+
Value: !Ref LoadBalancerDeregistrationDelay
182182
HTTPCodeELB5XXTooHighAlarm:
183183
Condition: HasAlertTopic
184184
Type: 'AWS::CloudWatch::Alarm'
@@ -326,7 +326,7 @@ Resources:
326326
PolicyName: !Sub '${AWS::StackName}-scale-up'
327327
PolicyType: StepScaling
328328
ScalingTargetId: !Ref ScalableTarget
329-
StepScalingPolicyConfiguration:
329+
StepScalingPolicyConfiguration:
330330
AdjustmentType: PercentChangeInCapacity
331331
Cooldown: 300
332332
MinAdjustmentMagnitude: 1
@@ -339,7 +339,7 @@ Resources:
339339
PolicyName: !Sub '${AWS::StackName}-scale-down'
340340
PolicyType: StepScaling
341341
ScalingTargetId: !Ref ScalableTarget
342-
StepScalingPolicyConfiguration:
342+
StepScalingPolicyConfiguration:
343343
AdjustmentType: PercentChangeInCapacity
344344
Cooldown: 300
345345
MinAdjustmentMagnitude: 1

jenkins/jenkins2-ha-agents.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ Resources:
723723
content: |
724724
#!/usr/bin/env ruby
725725
# chkconfig: - 80 20
726-
APP_NAME = 'lifecycle-poller'
726+
APP_NAME = 'lifecycle-poller'
727727
APP_PATH = '/opt/lifecycle-poller/daemon.rb'
728728
case ARGV.first
729729
when 'start'
@@ -1452,7 +1452,7 @@ Resources:
14521452
content: |
14531453
#!/usr/bin/env ruby
14541454
# chkconfig: - 80 20
1455-
APP_NAME = 'agent-healthcheck'
1455+
APP_NAME = 'agent-healthcheck'
14561456
APP_PATH = '/opt/agent-healthcheck/daemon.rb'
14571457
case ARGV.first
14581458
when 'start'

jenkins/jenkins2-ha.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Resources:
191191
FileSystemId: !Ref MasterStorage
192192
SecurityGroups:
193193
- !Ref MasterStorageSG
194-
SubnetId:
194+
SubnetId:
195195
'Fn::ImportValue': !Sub '${ParentVPCStack}-SubnetA${MasterSubnetsReach}'
196196
MasterStorageMountTargetB:
197197
Type: 'AWS::EFS::MountTarget'

mkdocs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
site_name: 'Free Templates for AWS CloudFormation'
44
docs_dir: 'docs'
55
pages:
6-
- 'Home': 'index.md'
7-
- 'EC2': 'ec2.md'
8-
- 'ECS': 'ecs.md'
9-
- 'Jenkins': 'jenkins.md'
10-
- 'Operations': 'operations.md'
11-
- 'Security': 'security.md'
12-
- 'Static Website': 'static-website.md'
13-
- 'VPC': 'vpc.md'
14-
- 'WordPress': 'wordpress.md'
15-
- 'Migrate to v4': 'migrate-v4.md'
6+
- 'Home': 'index.md'
7+
- 'EC2': 'ec2.md'
8+
- 'ECS': 'ecs.md'
9+
- 'Jenkins': 'jenkins.md'
10+
- 'Operations': 'operations.md'
11+
- 'Security': 'security.md'
12+
- 'Static Website': 'static-website.md'
13+
- 'VPC': 'vpc.md'
14+
- 'WordPress': 'wordpress.md'
15+
- 'Migrate to v4': 'migrate-v4.md'

static-website/static-website.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Resources:
4747
Certificate:
4848
Condition: HasCreateAcmCertificate
4949
Type: 'AWS::CertificateManager::Certificate'
50-
Properties:
50+
Properties:
5151
DomainName: !Ref DomainName
5252
DomainValidationOptions: !If
5353
- HasRedirectDomainName
@@ -84,7 +84,7 @@ Resources:
8484
- !Ref DomainName
8585
Comment: !Ref DomainName
8686
Origins:
87-
- DomainName: !Select [ 2, !Split [ /, !GetAtt S3Bucket.WebsiteURL ] ]
87+
- DomainName: !Select [2, !Split ['/', !GetAtt 'S3Bucket.WebsiteURL']]
8888
Id: s3origin
8989
CustomOriginConfig:
9090
OriginProtocolPolicy: 'http-only'
@@ -107,8 +107,8 @@ Resources:
107107
HttpVersion: http2
108108
PriceClass: 'PriceClass_All'
109109
ViewerCertificate:
110-
AcmCertificateArn: !If [HasCreateAcmCertificate, !Ref Certificate, !If [HasAcmCertificateArn, !Ref ExistingCertificate, !Ref 'AWS::NoValue']]
111-
IamCertificateId: !If [HasIamCertificateId, !Ref ExistingCertificate, !Ref 'AWS::NoValue']
110+
AcmCertificateArn: !If [HasCreateAcmCertificate, !Ref Certificate, !If [HasAcmCertificateArn, !Ref ExistingCertificate, !Ref 'AWS::NoValue']]
111+
IamCertificateId: !If [HasIamCertificateId, !Ref ExistingCertificate, !Ref 'AWS::NoValue']
112112
SslSupportMethod: 'sni-only'
113113
MinimumProtocolVersion: TLSv1
114114
Route53Record:
@@ -140,7 +140,7 @@ Resources:
140140
- !Ref RedirectDomainName
141141
Comment: !Ref RedirectDomainName
142142
Origins:
143-
- DomainName: !Select [ 2, !Split [ /, !GetAtt S3BucketRedirect.WebsiteURL ] ]
143+
- DomainName: !Select [2, !Split ['/', !GetAtt 'S3BucketRedirect.WebsiteURL']]
144144
Id: s3origin
145145
CustomOriginConfig:
146146
OriginProtocolPolicy: 'http-only'
@@ -163,8 +163,8 @@ Resources:
163163
HttpVersion: http2
164164
PriceClass: 'PriceClass_All'
165165
ViewerCertificate:
166-
AcmCertificateArn: !If [HasCreateAcmCertificate, !Ref Certificate, !If [HasAcmCertificateArn, !Ref ExistingCertificate, !Ref 'AWS::NoValue']]
167-
IamCertificateId: !If [HasIamCertificateId, !Ref ExistingCertificate, !Ref 'AWS::NoValue']
166+
AcmCertificateArn: !If [HasCreateAcmCertificate, !Ref Certificate, !If [HasAcmCertificateArn, !Ref ExistingCertificate, !Ref 'AWS::NoValue']]
167+
IamCertificateId: !If [HasIamCertificateId, !Ref ExistingCertificate, !Ref 'AWS::NoValue']
168168
SslSupportMethod: 'sni-only'
169169
MinimumProtocolVersion: TLSv1
170170
Route53RecordRedirect:

vpc/vpc-2azs-legacy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Parameters:
6363
Resources:
6464
Dummy:
6565
Type: 'AWS::S3::Bucket'
66-
Properties:
66+
Properties:
6767
BucketName: !Ref 'AWS::StackName'
6868
Outputs:
6969
TemplateID:

0 commit comments

Comments
 (0)