diodonfrost.terragrunt
ansible-role-terragrunt
该角色用于在您的目标主机上安装 terragrunt。
需求
该角色是使用 Ansible 2.8 开发的,不保证向后兼容。
使用 ansible-galaxy install diodonfrost.terragrunt
在您的系统上安装该角色。
角色变量
这个角色有多个变量。所有这些变量的默认值如下:
---
# ansible-role-terragrunt 的默认文件
# 定义要安装的 terragrunt 版本
# 可选值:https://api.github.com/repos/gruntwork-io/terragrunt/releases
# 默认:latest
terragrunt_version: latest
# 定义要安装 Terragrunt 二进制文件的位置
# 默认:使用 Ansible vars/*.yml 中定义的本地系统路径
terragrunt_path: "{{ terragrunt_default_path }}"
依赖
无
示例剧本
这是一个示例剧本文件,用于在 localhost 部署 Ansible Galaxy terragrunt 角色并安装最新的 terragrunt 版本。
---
- hosts: localhost
become: true
roles:
- role: diodonfrost.terragrunt
该角色也可以安装特定版本的 terragrunt。
---
- hosts: localhost
become: true
roles:
- role: ansible-role-terragrunt
vars:
terragrunt_version: v0.18.0
本地测试
该项目使用 Molecule 来辅助开发和测试。
要进行开发或测试,您需要安装以下内容:
- Linux(例如 Ubuntu)
- Docker
- Python(包括 python-pip)
- Ansible
- Molecule
- Libvirt(仅限 Windows 测试)
- Vagrant(仅限 Windows 测试)
使用 Docker 测试
# 安装依赖
pip install -r requirements-dev.txt
# 使用 centos 8 测试 ansible 角色
molecule test
# 使用 ubuntu 18.04 测试 ansible 角色
image=ansible-ubuntu:18.04 molecule test
# 创建 centos 7 实例
image=ansible-centos:7 molecule create
# 在 centos 7 实例上应用角色
image=ansible-centos:7 molecule converge
# 在 centos 7 实例上启动测试
image=ansible-centos:7 molecule verify
使用 Vagrant 和 Libvirt 测试
# 在 Windows 上测试 ansible 角色
molecule test -s windows
许可
Apache 2
作者信息
该角色由 diodonfrost 于 2019 年创建。
关于项目
Ansible role for install terragrunt on a large number of os
安装
ansible-galaxy install diodonfrost.terragrunt
许可证
apache-2.0
下载
46k
拥有者