Skip to content

Commit

Permalink
[mq] working branch - merge 55d457c on top of main at 32bc60c
Browse files Browse the repository at this point in the history
{"baseBranch":"main","baseCommit":"32bc60cc3e9edf191f6ba967462642209ac8855f","createdAt":"2024-10-18T15:07:59.721256Z","headSha":"55d457ce7af5f34d97993165125e929b8be36bdf","id":"6c127c4c-6c0d-4164-b4fa-5e65bd62ba56","priority":"200","pullRequestNumber":"1207","queuedAt":"2024-10-18T15:07:59.685764Z","status":"STATUS_QUEUED"}
  • Loading branch information
dd-mergequeue[bot] authored Oct 18, 2024
2 parents 90c5851 + 55d457c commit 4da19f2
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions components/os/debian_disable_upgrades.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package os

import (
_ "embed"
)

//go:embed scripts/debian-disable-unattended-upgrades.sh
var DebianDisableUnattendedUpgradesScriptContent string
2 changes: 2 additions & 0 deletions components/os/scripts/debian-disable-unattended-upgrades.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
apt-get -y remove unattended-upgrades
2 changes: 1 addition & 1 deletion components/os/windows_setup_ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import (
)

//go:embed scripts/setup-ssh.ps1
var SetupSSHScriptContent string
var WindowsSetupSSHScriptContent string
2 changes: 1 addition & 1 deletion resources/azure/compute/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func NewWindowsInstance(e azure.Environment, name, imageUrn, instanceType string
AsyncExecution: pulumi.Bool(false),
RunCommandName: pulumi.String("InitVM"),
Source: compute.VirtualMachineRunCommandScriptSourceArgs{
Script: pulumi.String(strings.Join([]string{setupSSHParamScriptContent, componentsos.SetupSSHScriptContent}, "\n\n")),
Script: pulumi.String(strings.Join([]string{setupSSHParamScriptContent, componentsos.WindowsSetupSSHScriptContent}, "\n\n")),
},
Parameters: compute.RunCommandInputParameterArray{
compute.RunCommandInputParameterArgs{
Expand Down
2 changes: 1 addition & 1 deletion scenarios/aws/ec2/os_win.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func getWindowsOpenSSHUserData(publicKeyPath string) (string, error) {
}

return buildAWSPowerShellUserData(
componentsos.SetupSSHScriptContent,
componentsos.WindowsSetupSSHScriptContent,
windowsPowerShellArgument{name: "authorizedKey", value: string(publicKey)},
),
nil
Expand Down
3 changes: 2 additions & 1 deletion scenarios/aws/ec2/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ func defaultVMArgs(e aws.Environment, vmArgs *vmArgs) error {
if err != nil {
return err
}

vmArgs.userData = vmArgs.userData + sshUserData
} else if vmArgs.osInfo.Flavor == os.Ubuntu || vmArgs.osInfo.Flavor == os.Debian {
vmArgs.userData = vmArgs.userData + os.DebianDisableUnattendedUpgradesScriptContent
}

return nil
Expand Down

0 comments on commit 4da19f2

Please sign in to comment.