diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg new file mode 100644 index 0000000..9083c0d --- /dev/null +++ b/ansible/ansible.cfg @@ -0,0 +1 @@ +remote_tmp = /tmp/.ansible-${USER}/tmp \ No newline at end of file diff --git a/packer/ubuntuserver20.04.pkr.hcl b/packer/ubuntuserver20.04.pkr.hcl index 1b38a97..54e5898 100644 --- a/packer/ubuntuserver20.04.pkr.hcl +++ b/packer/ubuntuserver20.04.pkr.hcl @@ -68,7 +68,11 @@ build { sources = ["source.vsphere-iso.ubuntuserver"] provisioner "ansible" { - playbook_file = "ansible/playbook.yml" + playbook_file = "ansible/playbook.yml" + user = "ubuntu" + ansible_env_vars = [ + "ANSIBLE_CONFIG=ansible/ansible.cfg" + ] } post-processor "shell-local" {