Last active
August 29, 2015 14:13
-
-
Save jamesdmorgan/458fbeb5afa8c627380e to your computer and use it in GitHub Desktop.
Ansible Packer.io local playbook
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
- hosts: local | |
connection: local | |
vars: | |
packer_file: packer_0.7.5_linux_amd64.zip | |
packer_url: "https://dl.bintray.com/mitchellh/packer/{{ packer_file }}" | |
packer_install_dir: /usr/local/packer | |
tasks: | |
- name: Install common tools | |
yum: name={{ item }} state=present | |
with_items: | |
- unzip | |
- wget | |
- bc | |
- ncdu | |
- sysstat | |
- time | |
- tree | |
- name: Create Packer directory | |
file: path={{ packer_install_dir }} mode='0755' owner=root group=root state=directory | |
- name: Download Packer.io | |
get_url: | |
url: "{{ packer_url }}" | |
dest: "/tmp" | |
validate_certs: no | |
- name: Unpack Packer.io | |
unarchive: | |
src: "/tmp/{{ packer_file }}" | |
dest: /usr/local/packer | |
- name: Cleanup Packer | |
file: path=/tmp/{{ packer_file }} state=absent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment