Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save fischerdr/b5cb652506b4c29820f55ec3eb0b6736 to your computer and use it in GitHub Desktop.

Select an option

Save fischerdr/b5cb652506b4c29820f55ec3eb0b6736 to your computer and use it in GitHub Desktop.
Install Packer with WinRM communicator / Ansible / Qemu and enable Packer's Winrm communicator in Fedora
dnf install -y ansible qemu-img qemu-kvm wget unzip
cd /tmp
wget https://releases.hashicorp.com/packer/1.1.1/packer_1.1.1_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