Add logging;Move iso-file specifics to variable file;Housekeeping
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Danny Bessems 2021-06-10 11:39:42 +02:00
parent 990534618b
commit f40889370d
6 changed files with 27 additions and 6 deletions

View File

@ -1,5 +1,5 @@
---
- hosts: localhost
- hosts: 127.0.0.1
connection: local
gather_facts: false
# become: true

View 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'

View File

@ -4,6 +4,9 @@
- name: Remove cloud-init
import_tasks: cloud-init.yml
- name: Configure default logging
import_tasks: logging.yml
- name: Configure services
import_tasks: services.yml

View 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"

View File

@ -51,8 +51,8 @@ source "vsphere-iso" "ubuntuserver" {
"packer/preseed/UbuntuServer20.04/meta-data"
]
cd_label = "cidata"
iso_checksum = "sha256:D1F2BF834BBE9BB43FAF16F9BE992A6F3935E65BE0EDECE1DEE2AA6EB1767423"
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_url = var.iso_authenticatedurl
iso_checksum = var.iso_checksum
shutdown_command = "echo '${var.ssh_password}' | sudo -S shutdown -P now"
shutdown_timeout = "5m"

View File

@ -1,6 +1,8 @@
variable "vcenter_server" {}
variable "vsphere_username" {}
variable "vsphere_password" {}
variable "vsphere_password" {
sensitive = true
}
variable "vsphere_host" {}
variable "vsphere_datacenter" {}
@ -12,7 +14,16 @@ variable "vsphere_network" {}
variable "vm_name" {}
variable "vm_guestos" {}
variable "ssh_password" {}
variable "ssh_password" {
sensitive = true
}
variable "iso_url" {}
variable "iso_checksum" {}
variable "repo_username" {}
variable "repo_password" {}
variable "repo_password" {
sensitive = true
}
locals {
iso_authenticatedurl = "https://${var.repo_username}:${var.repo_password}@${var.iso_url}"
}