darkwizard242.packer

Ansible Role: Packer

This Ansible role installs the packer package on Debian/Ubuntu and EL systems.

Requirements

No requirements.

Role Variables

The available variables are listed below (found in defaults/main.yml):

List of Variables:

packer_app: packer
packer_version: 1.11.2
packer_os: "{{ ansible_system | lower }}"
packer_architecture_map:
  amd64: amd64
  arm: arm64
  x86_64: amd64
  armv6l: armv6
  armv7l: armv7
  aarch64: arm64
  32-bit: "386"
  64-bit: amd64
packer_dl_url: https://releases.hashicorp.com
packer_dl_loc: /tmp
packer_bin_path: /usr/local/bin
packer_file_owner: root
packer_file_group: root
packer_file_mode: '0755'

Description of Variables:

Variable Description
packer_app Specifies the app to install (in this case, packer).
packer_version Version of packer to install, defaults to 1.11.2.
packer_os Type of operating system, used to get the right binaries.
packer_architecture_map Maps the OS architecture to set the correct binaries.
packer_dl_url URL to download the packer binary.
packer_dl_loc Temporary location to store the downloaded binary, defaults to /tmp.
packer_bin_path Path to store the packer binary, defaults to /usr/local/bin.
packer_file_owner Owner of the packer binary file.
packer_file_group Group of the packer binary file.
packer_file_mode Permissions for the packer binary file.

Dependencies

No dependencies.

Example Playbooks

Default Installation

To use the role with the default behavior (installing packer) in your playbook:

- hosts: servers
  roles:
    - darkwizard242.packer

Customizing Version

To specify a different version of packer:

- hosts: servers
  roles:
    - darkwizard242.packer
  vars:
    packer_version: 1.5.4

Customizing Installation Path

To change the installation path of the packer binary:

- hosts: servers
  roles:
    - darkwizard242.packer
  vars:
    packer_bin_path: /bin/

License

This project is licensed under the MIT License.

Author Information

This role was created by Ali Muhammad.

Informazioni sul progetto

Installs/Uninstalls 'packer' for creating golden images for multiple platforms.

Installa
ansible-galaxy install darkwizard242.packer
Licenza
mit
Download
5.5k
Proprietario
Senior DevOps/CloudOps Engineer. Dedicated to Automating everything I come across. Love to work on and learn new technologies/tools everyday!