-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate.ps1
More file actions
22 lines (17 loc) · 738 Bytes
/
create.ps1
File metadata and controls
22 lines (17 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Set error action preference to stop
$ErrorActionPreference = "Stop"
# dot source load ALL functions from scripts/functions directory
$FunctionsPath = (Resolve-Path .\scripts\functions).Path
$Functions = Get-ChildItem -Path $FunctionsPath -Filter *.ps1
foreach ($Function in $Functions) {
. $Function.FullName
}
# Check if the Ubuntu-22.04 distro is already installed
$DistroName = "Ubuntu-24.04"
$DistroExe = $DistroName.ToLower().Replace("-", "").Replace(".", "")
# Call the create distro function
Install-Distro -DistroName $DistroName -DistroExe $DistroExe
# Copy the ansible content to the distro
Set-AnsibleProject -DistroName $DistroName
# Execute the ansible playbook on the distro
Invoke-Playbook -DistroExe $DistroExe