Skip to content

Ansible role to install tfenv and Terraform into user's home or custom directory

License

Notifications You must be signed in to change notification settings

giner/ansible-role-tfenv

Repository files navigation

Run tests

Ansible Role: tfenv

Installs tfenv and Terraform into a user's home or a custom directory

Requirements

  • Ubuntu

Installation

Install via Ansible Galaxy:

ansible-galaxy collection install giner.tfenv

Or include this role in your requirements.yml file:

roles:
  - name: giner.tfenv

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

User to install tfenv.

tfenv_user: "{{ ansible_user_id }}"

Directory to install tfenv.

tfenv_dir: "{{ tfenv_user }}/.tfenv"

Directory to create links to tfenv and terraform binaries.

tfenv_dir: "{{ tfenv_user }}/bin"

Dependencies

None.

Example Playbook

- hosts: terraform
  roles:
  - giner.tfenv

Development

Install test dependencies:

python3 -m pip install ansible -Ur requirements-molecule.txt

Run all tests (requires docker to be installed):

molecule test --all

License

Apache 2.0

Authors

This role was created in 2021 by Stanislav German-Evtushenko

About

Ansible role to install tfenv and Terraform into user's home or custom directory

Topics

Resources

License

Stars

Watchers

Forks