Skip to content
Snippets Groups Projects

Add features to packer template proxy

Files
2
@@ -36,11 +36,27 @@ source "openstack" "image" {
build {
sources = ["source.openstack.image"]
provisioner "shell" {
inline = [
"sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*",
"sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*"
]
}
provisioner "ansible" {
use_proxy = false
user = var.ssh_username
groups = ["proxy"]
ansible_env_vars = ["ANSIBLE_TIMEOUT=60", "ANSIBLE_HOST_KEY_CHECKING=False"]
ansible_env_vars = [
"ANSIBLE_TIMEOUT=60",
"ANSIBLE_HOST_KEY_CHECKING=False",
"ANSIBLE_VERBOSITY=${var.ANSIBLE_VERBOSITY}",
"ANSIBLE_DEBUG=${var.ANSIBLE_DEBUG}",
"ANSIBLE_FORCE_COLOR=true"
]
extra_arguments = [
"--extra-vars", "-vvv"
]
playbook_file = "./CRI_XCBC/proxy.yaml"
}
}
Loading