Skip to content
Snippets Groups Projects

Add features to packer template proxy

Files
2
@@ -36,11 +36,24 @@ source "openstack" "image" {
@@ -36,11 +36,24 @@ source "openstack" "image" {
build {
build {
sources = ["source.openstack.image"]
sources = ["source.openstack.image"]
 
provisioner "shell" {
 
inline = [
 
"sudo sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*",
 
"sudo sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*"
 
]
 
}
 
provisioner "ansible" {
provisioner "ansible" {
use_proxy = false
use_proxy = false
user = var.ssh_username
user = var.ssh_username
groups = ["proxy"]
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"
 
]
playbook_file = "./CRI_XCBC/proxy.yaml"
playbook_file = "./CRI_XCBC/proxy.yaml"
}
}
}
}
Loading