Compare commits
15 Commits
b6656c3d9c
...
UbuntuServ
Author | SHA1 | Date | |
---|---|---|---|
d29f7b3223 | |||
bd82e13fc4 | |||
2f902fa27c | |||
37ecd4a1b9 | |||
8a8cb09984 | |||
bc46b09708 | |||
d508b28213 | |||
03ed59680f | |||
40ade38c78 | |||
c89edd3ee9 | |||
e5880c222e | |||
236db40016 | |||
b340c777ba | |||
10624f8c90 | |||
eca6ae515e |
@@ -16,8 +16,8 @@
|
||||
line: "{{ item.line }}"
|
||||
state: "{{ item.state }}"
|
||||
loop:
|
||||
- { regex: '$#PasswordAuthentication', line: 'PasswordAuthentication no', state: present}
|
||||
- { regex: ~, line: 'PasswordAuthentication yes', state: absent}
|
||||
- { regex: '^#PasswordAuthentication', line: 'PasswordAuthentication no', state: present}
|
||||
- { regex: '^PasswordAuthentication yes', line: 'PasswordAuthentication yes', state: absent}
|
||||
- name: Delete 'ubuntu' user
|
||||
ansible.builtin.user:
|
||||
name: ubuntu
|
||||
|
@@ -1,2 +1,4 @@
|
||||
iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.2-live-server-amd64.iso"
|
||||
iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
|
||||
iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.4-live-server-amd64.iso"
|
||||
iso_checksum = "sha256:28CCDB56450E643BAD03BB7BCF7507CE3D8D90E8BF09E38F6BD9AC298A98EAAD"
|
||||
// iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.2-live-server-amd64.iso"
|
||||
// iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
|
||||
|
@@ -11,12 +11,14 @@ autoinstall:
|
||||
ethernets:
|
||||
ens192:
|
||||
dhcp4: true
|
||||
dhcp-identifier: mac
|
||||
storage:
|
||||
layout:
|
||||
name: lvm
|
||||
name: direct
|
||||
identity:
|
||||
hostname: packer-template
|
||||
username: ubuntu
|
||||
# password: $6$ZThRyfmSMh9499ar$KSZus58U/l58Efci0tiJEqDKFCpoy.rv25JjGRv5.iL33AQLTY2aljumkGiDAiX6LsjzVsGTgH85Tx4S.aTfx0
|
||||
password: $6$rounds=4096$ZKfzRoaQOtc$M.fhOsI0gbLnJcCONXz/YkPfSoefP4i2/PQgzi2xHEi2x9CUhush.3VmYKL0XVr5JhoYvnLfFwqwR/1YYEqZy/
|
||||
ssh:
|
||||
install-server: yes
|
||||
|
@@ -11,6 +11,7 @@ source "vsphere-iso" "ubuntuserver" {
|
||||
|
||||
vm_name = "${var.vm_guestos}-${var.vm_name}"
|
||||
datacenter = var.vsphere_datacenter
|
||||
cluster = var.vsphere_cluster
|
||||
host = var.vsphere_host
|
||||
folder = var.vsphere_folder
|
||||
datastore = var.vsphere_datastore
|
||||
@@ -65,9 +66,13 @@ source "vsphere-iso" "ubuntuserver" {
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.vsphere-iso.ubuntuserver"]
|
||||
sources = [
|
||||
"source.vsphere-iso.ubuntuserver"
|
||||
]
|
||||
|
||||
provisioner "ansible" {
|
||||
only = ["vsphere-iso.ubuntuserver"]
|
||||
|
||||
playbook_file = "ansible/playbook.yml"
|
||||
user = "ubuntu"
|
||||
ansible_env_vars = [
|
||||
@@ -80,6 +85,7 @@ build {
|
||||
}
|
||||
|
||||
post-processor "shell-local" {
|
||||
only = ["vsphere-iso.ubuntuserver"]
|
||||
inline = [
|
||||
"pwsh -command \"& scripts/Update-OvfConfiguration.ps1 \\",
|
||||
" -OVFFile '/scratch/ubuntuserver/${var.vm_guestos}-${var.vm_name}.ovf' \\",
|
||||
|
@@ -6,6 +6,7 @@ variable "vsphere_password" {
|
||||
|
||||
variable "vsphere_host" {}
|
||||
variable "vsphere_datacenter" {}
|
||||
variable "vsphere_cluster" {}
|
||||
|
||||
variable "vsphere_templatefolder" {}
|
||||
variable "vsphere_folder" {}
|
||||
|
@@ -1,8 +1,9 @@
|
||||
vcenter_server = "bv11-vc.bessems.lan"
|
||||
vsphere_username = "administrator@vsphere.local"
|
||||
vsphere_datacenter = "DeSchakel"
|
||||
vsphere_cluster = "Cluster.Legacy"
|
||||
vsphere_host = "bv11-esx.bessems.lan"
|
||||
vsphere_datastore = "Datastore01.SSD"
|
||||
vsphere_datastore = "ESX00.SSD01"
|
||||
vsphere_folder = "/Packer"
|
||||
vsphere_templatefolder = "/Templates"
|
||||
vsphere_network = "LAN"
|
Reference in New Issue
Block a user