robertdebock.hashicorp
Ansible Role HashiCorp
This allows you to install HashiCorp products using packages.
GitHub | GitLab | Downloads | Version |
---|---|---|---|
Example Playbook
Here's a simple example taken from molecule/default/converge.yml
. It is tested every time there is a code change.
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.hashicorp
hashicorp_products:
- name: consul
version: "1.11.3"
- role: robertdebock.hashicorp
hashicorp_installation_method: manual
hashicorp_products:
- name: vault
version: "1.9.0"
type: ent
Make sure the machine is ready. In CI, this is done using molecule/default/prepare.yml
:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
- role: robertdebock.core_dependencies
For more information, see a full explanation and example on using these roles.
Role Variables
Default values for the variables can be found in defaults/main.yml
:
---
# defaults file for hashicorp
# Choose how to install HashiCorp products: either `package` or
# `manual`. `manual` means this role will download from
# "https://releases.hashicorp.com/vault/".
hashicorp_installation_method: package
# Install HashiCorp products by listing them here.
# hashicorp_products:
# - name: consul
# - name: consul-template
# - name: nomad
# - name: packer
# - name: terraform
# - name: vagrant
# - name: vault
# If using `manual` for `hashicorp_installation_method`, specify the version here.
# hashicorp_products:
# - name: vault
# version: "1.10.4"
# For `vault`, choose the type: either `oss` (default), `ent`, or `hsm`.
# hashicorp_products:
# - name: vault
# type: oss
# Specify where to install the software.
hashicorp_destination: /usr/bin
# Set owner/group/mode for the installed binary.
hashicorp_group: root
hashicorp_owner: root
hashicorp_mode: "0755"
Requirements
- pip packages are listed in requirements.txt.
State of Used Roles
Several roles are used to prepare a system. You can prepare it in another way.
Requirement | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap | ||
robertdebock.core_dependencies |
Context
This role is part of many compatible roles. Check out the documentation of these roles for more information.
Here's a view of related roles:
Compatibility
This role has been tested on the following container images:
Container | Tags |
---|---|
Amazon | Candidate |
EL | 9 |
Debian | bullseye |
Fedora | 37, 38 |
Ubuntu | all |
You need Ansible version 2.12 or higher. Tests have also been done with:
- The previous version.
- The current version.
- The development version.
If you find any issues, please report them in GitHub.
License
Author Information
You can consider sponsoring me.
Install HashiCorp products using packages.
ansible-galaxy install robertdebock.hashicorp