giner.tfenv

运行测试

Ansible 角色: tfenv

将 tfenv 和 Terraform 安装到用户的主目录或自定义目录中

需求

  • Ubuntu

安装

通过 Ansible Galaxy 安装:

ansible-galaxy collection install giner.tfenv

或者在你的 requirements.yml 文件中包含这个角色:

roles:
  - name: giner.tfenv

角色变量

可用的变量如下所示,包含默认值(请查看 defaults/main.yml):

安装 tfenv 的用户。

tfenv_user: "{{ ansible_user_id }}"

安装 tfenv 的目录。

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

创建指向 tfenv 和 terraform 可执行文件的链接的目录。

tfenv_bin_dir: "{{ tfenv_user }}/bin"

依赖关系

无。

示例剧本

- hosts: terraform
  roles:
  - giner.tfenv

开发

安装测试依赖:

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

运行所有测试(需要安装 Docker):

molecule test --all

许可证

Apache 2.0

作者

此角色由 Stanislav German-Evtushenko 于 2021 年创建

关于项目

Install tfenv and Terraform into user's home or custom directory

安装
ansible-galaxy install giner.tfenv
许可证
apache-2.0
下载
14.6k