Last active
December 15, 2017 10:53
-
-
Save ruzickap/e1b6ac258425b6d314f0c3cab07a5570 to your computer and use it in GitHub Desktop.
Install Packer with WinRM communicator / Ansible / Qemu and enable Packer's Winrm communicator in Fedora
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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