Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Packer with WinRM communicator / Ansible / Qemu and enable Packer's Winrm communicator in Fedora
# Install necessary packages
dnf install -y -q ansible qemu-img qemu-kvm wget unzip
# Download and unpack Packer
cd /tmp
wget https://releases.hashicorp.com/packer/1.1.3/packer_1.1.3_linux_amd64.zip
unzip packer*.zip
# Use packerio as a binary name, because packer binary already exists in fedora : /usr/sbin/packer as part of cracklib-dicts package
mv packer /usr/local/bin/packerio
# Install WinRM communicator for Packer (https://www.packer.io/docs/provisioners/ansible.html#winrm-communicator)
mkdir -p ~/.ansible/plugins/connection_plugins
wget -P ~/.ansible/plugins/connection_plugins/ https://raw.githubusercontent.com/hashicorp/packer/master/test/fixtures/provisioner-ansible/connection_plugins/packer.py
sed -i.orig 's@#connection_plugins =.*@connection_plugins = ~/.ansible/plugins/connection_plugins/@' /etc/ansible/ansible.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.