"provisioners": [ { "type": "ansible", "playbook_file": "{{user `playbook_file`}}", "use_proxy": false, "ansible_env_vars": [ "ANSIBLE_HOST_KEY_CHECKING=False", "ANSIBLE_SSH_ARGS='-o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=60s'", "ANSIBLE_NOCOLOR=True" ] } ]
packer build -on-error=ask packer.json
sudo pip install ansible==2.7.17
aws configure --profile example
{ "variables": { "aws_profile": "{{env `AWS_PROFILE`}}", "aws_region": "ap-northeast-1" }, "builders": [ { "type": "amazon-ebs", "profile": "{{user `aws_profile`}}", "region": "{{user `aws_region`}}" } ] }
AWS_PROFILE=example packer build packer.json
function "clean_ami_name" not defined in:
-NG: {{isotime | clean_ami_name}} +OK: {{isotime | clean_resource_name}}
Build 'virtualbox-iso' errored: Error attaching floppy: VBoxManage error: VBoxManage.exe: error: Could not find file for the medium 'C:\wsl\CentOS7C?\Users\USER01\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\tmp\virtualbox714031622\floppy.vfd' (VERR_PATH_NOT_FOUND)
sudo wget -O /usr/local/bin/VBoxManage.sh https://raw.githubusercontent.com/finarfin/wsl-virtualbox/master/VBoxManage.sh sudo chmod +x /usr/local/bin/VBoxManage.sh sudo ln -s /usr/local/bin/VBoxManage.sh /usr/local/bin/VBoxManage
PACKER_VER=1.5.4 wget https://releases.hashicorp.com/packer/${PACKER_VER}/packer_${PACKER_VER}_linux_amd64.zip unzip packer_*linux_amd64.zip sudo mv packer /usr/local/bin/
sudo mkdir -p /opt/packer.0.8.6 sudo wget -O /opt/packer.0.8.6/packer_0.6.9_linux_amd64.zip https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip sudo unzip -d /opt/packer.0.8.6/ /opt/packer.0.8.6/packer_0.6.9_linux_amd64.zip sudo alternatives --install /usr/local/bin/packer packer /opt/packer.0.8.6/packer 86 \ --slave /usr/local/bin/packer-builder-amazon-chroot packer-builder-amazon-chroot /opt/packer.0.8.6/packer-builder-amazon-chroot \ --slave /usr/local/bin/packer-builder-amazon-ebs packer-builder-amazon-ebs /opt/packer.0.8.6/packer-builder-amazon-ebs \ --slave /usr/local/bin/packer-builder-amazon-instance packer-builder-amazon-instance /opt/packer.0.8.6/packer-builder-amazon-instance \ --slave /usr/local/bin/packer-builder-digitalocean packer-builder-digitalocean /opt/packer.0.8.6/packer-builder-digitalocean \ --slave /usr/local/bin/packer-builder-docker packer-builder-docker /opt/packer.0.8.6/packer-builder-docker \ --slave /usr/local/bin/packer-builder-file packer-builder-file /opt/packer.0.8.6/packer-builder-file \ --slave /usr/local/bin/packer-builder-googlecompute packer-builder-googlecompute /opt/packer.0.8.6/packer-builder-googlecompute \ --slave /usr/local/bin/packer-builder-null packer-builder-null /opt/packer.0.8.6/packer-builder-null \ --slave /usr/local/bin/packer-builder-openstack packer-builder-openstack /opt/packer.0.8.6/packer-builder-openstack \ --slave /usr/local/bin/packer-builder-parallels-iso packer-builder-parallels-iso /opt/packer.0.8.6/packer-builder-parallels-iso \ --slave /usr/local/bin/packer-builder-parallels-pvm packer-builder-parallels-pvm /opt/packer.0.8.6/packer-builder-parallels-pvm \ --slave /usr/local/bin/packer-builder-qemu packer-builder-qemu /opt/packer.0.8.6/packer-builder-qemu \ --slave /usr/local/bin/packer-builder-virtualbox-iso packer-builder-virtualbox-iso /opt/packer.0.8.6/packer-builder-virtualbox-iso \ --slave /usr/local/bin/packer-builder-virtualbox-ovf packer-builder-virtualbox-ovf /opt/packer.0.8.6/packer-builder-virtualbox-ovf \ --slave /usr/local/bin/packer-builder-vmware-iso packer-builder-vmware-iso /opt/packer.0.8.6/packer-builder-vmware-iso \ --slave /usr/local/bin/packer-builder-vmware-vmx packer-builder-vmware-vmx /opt/packer.0.8.6/packer-builder-vmware-vmx \ --slave /usr/local/bin/packer-post-processor-artifice packer-post-processor-artifice /opt/packer.0.8.6/packer-post-processor-artifice \ --slave /usr/local/bin/packer-post-processor-atlas packer-post-processor-atlas /opt/packer.0.8.6/packer-post-processor-atlas \ --slave /usr/local/bin/packer-post-processor-compress packer-post-processor-compress /opt/packer.0.8.6/packer-post-processor-compress \ --slave /usr/local/bin/packer-post-processor-docker-import packer-post-processor-docker-import /opt/packer.0.8.6/packer-post-processor-docker-import \ --slave /usr/local/bin/packer-post-processor-docker-push packer-post-processor-docker-push /opt/packer.0.8.6/packer-post-processor-docker-push \ --slave /usr/local/bin/packer-post-processor-docker-save packer-post-processor-docker-save /opt/packer.0.8.6/packer-post-processor-docker-save \ --slave /usr/local/bin/packer-post-processor-docker-tag packer-post-processor-docker-tag /opt/packer.0.8.6/packer-post-processor-docker-tag \ --slave /usr/local/bin/packer-post-processor-vagrant packer-post-processor-vagrant /opt/packer.0.8.6/packer-post-processor-vagrant \ --slave /usr/local/bin/packer-post-processor-vagrant-cloud packer-post-processor-vagrant-cloud /opt/packer.0.8.6/packer-post-processor-vagrant-cloud \ --slave /usr/local/bin/packer-post-processor-vsphere packer-post-processor-vsphere /opt/packer.0.8.6/packer-post-processor-vsphere \ --slave /usr/local/bin/packer-provisioner-ansible-local packer-provisioner-ansible-local /opt/packer.0.8.6/packer-provisioner-ansible-local \ --slave /usr/local/bin/packer-provisioner-chef-client packer-provisioner-chef-client /opt/packer.0.8.6/packer-provisioner-chef-client \ --slave /usr/local/bin/packer-provisioner-chef-solo packer-provisioner-chef-solo /opt/packer.0.8.6/packer-provisioner-chef-solo \ --slave /usr/local/bin/packer-provisioner-file packer-provisioner-file /opt/packer.0.8.6/packer-provisioner-file \ --slave /usr/local/bin/packer-provisioner-powershell packer-provisioner-powershell /opt/packer.0.8.6/packer-provisioner-powershell \ --slave /usr/local/bin/packer-provisioner-puppet-masterless packer-provisioner-puppet-masterless /opt/packer.0.8.6/packer-provisioner-puppet-masterless \ --slave /usr/local/bin/packer-provisioner-puppet-server packer-provisioner-puppet-server /opt/packer.0.8.6/packer-provisioner-puppet-server \ --slave /usr/local/bin/packer-provisioner-salt-masterless packer-provisioner-salt-masterless /opt/packer.0.8.6/packer-provisioner-salt-masterless \ --slave /usr/local/bin/packer-provisioner-shell packer-provisioner-shell /opt/packer.0.8.6/packer-provisioner-shell \ --slave /usr/local/bin/packer-provisioner-shell-local packer-provisioner-shell-local /opt/packer.0.8.6/packer-provisioner-shell-local \ --slave /usr/local/bin/packer-provisioner-windows-restart packer-provisioner-windows-restart /opt/packer.0.8.6/packer-provisioner-windows-restart \ --slave /usr/local/bin/packer-provisioner-windows-shell packer-provisioner-windows-shell /opt/packer.0.8.6/packer-provisioner-windows-shell \
sudo alternatives --display packer sudo alternatives --set packer /opt/packer.0.8.6/packer
brew install packer