fix(snippets/cloud-init): remove confusing merge statements

This commit is contained in:
Michele Cereda
2024-10-11 19:25:08 +02:00
parent 39b8c58856
commit c19ae7fecf
2 changed files with 2 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
import * as cloudinit from "@pulumi/cloudinit";
import * as pulumi from "@pulumi/pulumi";
import * as yaml from 'yaml';
const userData = new cloudinit.Config(
@@ -11,7 +10,6 @@ const userData = new cloudinit.Config(
{
// docker on AmazonLinux 2023
filename: "cloud-config.docker-engine.yml",
mergeType: "dict(allow_delete,no_replace)+list(append)",
contentType: "text/cloud-config",
content: yaml.stringify({
package_upgrade: false,

View File

@@ -26,17 +26,14 @@ const userData = new cloudinit.Config(
defer: true,
}],
}),
mergeType: "dict(recurse_array,no_replace)+list(append)",
},
{
filename: "cloud-config.docker.yml",
contentType: "text/cloud-config",
content: fs.readFileSync("./docker.yum.yaml", "utf8"),
mergeType: "dict(recurse_array,no_replace)+list(append)",
},
{
filename: "cloud-config.gitlab-runner.yml",
mergeType: "dict(allow_delete,no_replace)+list(append)",
contentType: "text/cloud-config",
content: pulumi.all([ gitlabUrl, runnerToken ]).apply(
([ gitlabUrl, runnerToken ]) => yaml.stringify({
@@ -68,7 +65,7 @@ const userData = new cloudinit.Config(
`[[runners]]`,
` name = "runner autoscaler"`,
` url = "${gitlabUrl}"`,
` token = ${runnerToken}`,
` token = "${runnerToken}"`,
` executor = "sh"`,
].join("\n"),
}],
@@ -81,6 +78,7 @@ const userData = new cloudinit.Config(
),
},
{
filename: "cloud-config.postgres.yml",
contentType: "text/cloud-config",
content: yaml.stringify({
package_upgrade: false,
@@ -90,8 +88,6 @@ const userData = new cloudinit.Config(
"systemctl enable --now 'postgres'",
]
}),
filename: "cloud-config.postgres.yml",
mergeType: "dict(allow_delete,no_replace)+list(append)",
},
],
},