An Ansible Role that installs Packer on Debian and RedHat systems
- unzip
None
Available variables are listed below, along with default values (see defaults/main.yml
):
packer_version: 0.10.1
packer_os: linux
packer_arch: amd64
packer_ext: zip
packer_url: "https://releases.hashicorp.com/packer/{{ packer_version }}/packer_{{ packer_version }}_{{ packer_os }}_{{ packer_arch }}.{{ packer_ext }}"
packer_package: "packer_{{ packer_version }}_{{ packer_os }}_{{ packer_arch }}.{{ packer_ext }}"
packer_filename: packer
Packer download information (version, os and platform architecture), compressed and uncompressed filenames.
$ bundle
This kitchen configuration comes with different VMs:
- centos7
- centos6
- trusty (Ubuntu-14.04)
- xenial (Ubuntu-16.04)
- jessie (Debian-8)
If you want to test the role using all of those machines, just run the commands below as they are. If you want to test the role on one system only, append to the commands below the VM name.
e.g.
$ bundle exec kitchen converge centos7
To converge the centos7
VM only.
$ bundle exec kitchen create
$ bundle exec kitchen converge
$ bundle exec kitchen verify
NB: To run verify
the VM must be converged first.
$ bundle exec kitchen destroy
$ bundle exec kitchen test
You can write your own test by adding a new file or editing the existing one living in the test/integration/packer/serverspec/localhost
directory. More info about how to write serverspec test can be found here.
- hosts: all
roles:
- darkraiden.ansible-packer
BSD
This role was created in 2017 by Davide Di Mauro.