You can use the configset method to build multiple configset blocks within one configset. This allow you to better organize large configsets. Also, as noted in AWS::CloudFormation::Init, cfn-init processes configuration sections in a specific order. So this can also be useful if you need to more control over ordering.
The cfn-init processes sections according to the following order AWS::CloudFormation::Init :
configset("configset-1") do command("create-file", command: "touch /tmp/test.txt", test: "test -e /tmp/test.txt", ) end configset("configset-2") do command("uptime-command", command: "uptime" ) end
--- AWS::CloudFormation::Init: configSets: default: - configset-1 - configset-2 configset-1: commands: 001_create-file: command: touch /tmp/test.txt test: test -e /tmp/test.txt configset-2: commands: 001_uptime-command: command: uptime
Notice, how you do not have to define the
configSets key. Lono automatically generates
configSets structure using the order which you declare the
Back to DSL Docs
Pro tip: Use the <- and -> arrow keys to move back and forward.