Housekeeping;Add debugging information
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
f36f452a59
commit
ae98042e4e
10
.drone.yml
10
.drone.yml
@ -3,6 +3,16 @@ type: kubernetes
|
|||||||
name: 'Packer Build'
|
name: 'Packer Build'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Debugging information
|
||||||
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
set -x
|
||||||
|
|
||||||
|
yamllint --version
|
||||||
|
packer --version
|
||||||
|
pwsh --version
|
||||||
|
ovftool --version
|
||||||
- name: Active Directory Domain Services
|
- name: Active Directory Domain Services
|
||||||
image: bv11-cr01.bessems.eu/library/packer-extended
|
image: bv11-cr01.bessems.eu/library/packer-extended
|
||||||
pull: always
|
pull: always
|
||||||
|
@ -1,91 +0,0 @@
|
|||||||
{
|
|
||||||
"builders": [
|
|
||||||
{
|
|
||||||
"type": "vsphere-clone",
|
|
||||||
"name": "adds",
|
|
||||||
|
|
||||||
"vcenter_server": "{{user `vcenter_server`}}",
|
|
||||||
"username": "{{user `vsphere_username`}}",
|
|
||||||
"password": "{{user `vsphere_password`}}",
|
|
||||||
"insecure_connection": "true",
|
|
||||||
|
|
||||||
"vm_name": "adds-{{user `vm_name`}}",
|
|
||||||
"datastore": "{{user `vsphere_datastore`}}",
|
|
||||||
"folder": "{{user `vsphere_folder`}}",
|
|
||||||
"datacenter": "{{user `vsphere_datacenter`}}",
|
|
||||||
"host": "{{user `vsphere_host`}}",
|
|
||||||
"boot_order": "disk,cdrom",
|
|
||||||
|
|
||||||
"communicator": "winrm",
|
|
||||||
"winrm_username": "administrator",
|
|
||||||
"winrm_password": "{{user `winrm_password`}}",
|
|
||||||
"winrm_timeout": "10m",
|
|
||||||
|
|
||||||
"cpus": 2,
|
|
||||||
"RAM": 8192,
|
|
||||||
|
|
||||||
"template": "Windows-Server-2019-LTSC",
|
|
||||||
|
|
||||||
"floppy_files": [
|
|
||||||
"packer/preseed/ADDS/Sysprep_Unattend.xml"
|
|
||||||
],
|
|
||||||
|
|
||||||
"boot_command": "",
|
|
||||||
"boot_wait": "2m30s",
|
|
||||||
|
|
||||||
"shutdown_command": "C:\\Windows\\System32\\Sysprep\\sysprep.exe /generalize /oobe /unattend:A:\\Sysprep_Unattend.xml",
|
|
||||||
"shutdown_timeout": "1h",
|
|
||||||
|
|
||||||
"export": {
|
|
||||||
"images": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"provisioners": [
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"inline": [
|
|
||||||
"New-Item -Path 'C:\\Payload\\Scripts' -ItemType 'Directory' -Force:$True -Confirm:$False"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"source": "scripts/ADDS/payload/",
|
|
||||||
"destination": "C:\\Payload\\"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "powershell",
|
|
||||||
"scripts": [
|
|
||||||
"scripts/ADDS/Install-Prerequisites.ps1",
|
|
||||||
"scripts/ADDS/Register-ScheduledTask.ps1"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"post-processors": [[
|
|
||||||
{
|
|
||||||
"type": "shell-local",
|
|
||||||
"inline": [
|
|
||||||
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
|
|
||||||
" -OVFFile './output-adds/adds-{{user `vm_name`}}.ovf' \\",
|
|
||||||
" -Parameter @{'appliance.name'='ADDS';'appliance.version'='{{user `vm_name`}}'}\"",
|
|
||||||
"pwsh -file scripts/Update-Manifest.ps1 \\",
|
|
||||||
" -ManifestFileName './output-adds/adds-{{user `vm_name`}}.mf'",
|
|
||||||
"ovftool --acceptAllEulas --allowExtraConfig --overwrite \\",
|
|
||||||
" './output-adds/adds-{{user `vm_name`}}.ovf' \\",
|
|
||||||
" /output/ADDS-appliance.ova"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"type": "shell-local",
|
|
||||||
"inline": [
|
|
||||||
"pwsh -file scripts/Remove-Resources.ps1 \\",
|
|
||||||
" -VMName 'adds-{{user `vm_name`}}' \\",
|
|
||||||
" -VSphereFQDN '{{user `vcenter_server`}}' \\",
|
|
||||||
" -VSphereUsername '{{user `vsphere_username`}}' \\",
|
|
||||||
" -VSpherePassword '{{user `vsphere_password`}}'"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user