Add logging;Move iso-file specifics to variable file;Housekeeping
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
990534618b
commit
f40889370d
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
- hosts: localhost
|
- hosts: 127.0.0.1
|
||||||
connection: local
|
connection: local
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
# become: true
|
# become: true
|
||||||
|
5
ansible/roles/os/tasks/logging.yml
Normal file
5
ansible/roles/os/tasks/logging.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- name: Enable crontab logging
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/rsyslog.d/50-default.conf
|
||||||
|
regexp: '^#cron\.\*.*'
|
||||||
|
line: "cron.*\t\t\t\t./var/log/cron.log'
|
@ -4,6 +4,9 @@
|
|||||||
- name: Remove cloud-init
|
- name: Remove cloud-init
|
||||||
import_tasks: cloud-init.yml
|
import_tasks: cloud-init.yml
|
||||||
|
|
||||||
|
- name: Configure default logging
|
||||||
|
import_tasks: logging.yml
|
||||||
|
|
||||||
- name: Configure services
|
- name: Configure services
|
||||||
import_tasks: services.yml
|
import_tasks: services.yml
|
||||||
|
|
||||||
|
2
packer/iso.auto.pkrvars.hcl
Normal file
2
packer/iso.auto.pkrvars.hcl
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
iso_url = "sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.2-live-server-amd64.iso"
|
||||||
|
iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
|
@ -51,8 +51,8 @@ source "vsphere-iso" "ubuntuserver" {
|
|||||||
"packer/preseed/UbuntuServer20.04/meta-data"
|
"packer/preseed/UbuntuServer20.04/meta-data"
|
||||||
]
|
]
|
||||||
cd_label = "cidata"
|
cd_label = "cidata"
|
||||||
iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
|
iso_url = var.iso_authenticatedurl
|
||||||
iso_url = "https://${var.repo_username}:${var.repo_password}@sn.itch.fyi/Repository/iso/Canonical/Ubuntu%20Server%2020.04/ubuntu-20.04.2-live-server-amd64.iso"
|
iso_checksum = var.iso_checksum
|
||||||
|
|
||||||
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
|
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
|
||||||
shutdown_timeout = "5m"
|
shutdown_timeout = "5m"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
variable "vcenter_server" {}
|
variable "vcenter_server" {}
|
||||||
variable "vsphere_username" {}
|
variable "vsphere_username" {}
|
||||||
variable "vsphere_password" {}
|
variable "vsphere_password" {
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
variable "vsphere_host" {}
|
variable "vsphere_host" {}
|
||||||
variable "vsphere_datacenter" {}
|
variable "vsphere_datacenter" {}
|
||||||
@ -12,7 +14,16 @@ variable "vsphere_network" {}
|
|||||||
|
|
||||||
variable "vm_name" {}
|
variable "vm_name" {}
|
||||||
variable "vm_guestos" {}
|
variable "vm_guestos" {}
|
||||||
variable "ssh_password" {}
|
variable "ssh_password" {
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "iso_url" {}
|
||||||
|
variable "iso_checksum" {}
|
||||||
variable "repo_username" {}
|
variable "repo_username" {}
|
||||||
variable "repo_password" {}
|
variable "repo_password" {
|
||||||
|
sensitive = true
|
||||||
|
}
|
||||||
|
locals {
|
||||||
|
iso_authenticatedurl = "https://${var.repo_username}:${var.repo_password}@${var.iso_url}"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user