monolithprojects.hashicorp_tools
Hashicorp工具 - Ansible角色
这个Ansible角色将安装/升级/卸载Hashicorp工具。 Ansible角色不使用deb或rpm包,而是从https://releases.hashicorp.com直接安装二进制文件到系统中。
需求
由于二进制文件是以Zip文件分发的,如果系统中没有
unzip
工具,角色将自动安装它。如果你安装
vagrant
,角色会自动安装fuse
或libfuse2
(取决于你系统使用的包管理工具)
- 每周在以下系统上测试(但是在旧版本上运行良好):
- CentOS 8
- Debian 10
- Fedora 33
- Ubuntu 20
角色变量
这是defaults/main.yml
的副本
---
# Hashicorp下载页面的URL
hashicorp_url: https://releases.hashicorp.com
# Hashicorp工具及其版本
# 支持的状态值有:present, absent
hashicorp_tools:
[]
# - name: boundary
# version: 0.1.0
# state: present
# - name: consul
# version: 1.8.4
# state: present
# - name: nomad
# version: 0.12.5
# state: present
# - name: packer
# version: 1.6.4
# state: present
# - name: terraform
# version: 0.13.4
# state: absent
# - name: vagrant
# version: 2.2.10
# state: present
# - name: vault
# version: 1.5.4
# state: absent
# - name: waypoint
# version: 0.1.1
# state: present
# 安装目录
install_dir: /usr/local/bin/
示例剧本
在这个示例中,Ansible角色将卸载Hashicorp Boundary,并安装(或升级)其余的Hashicorp工具到特定的版本。
---
- name: Hashicorp工具
hosts: all
vars:
hashicorp_tools:
- name: boundary
state: absent
- name: consul
version: 1.8.4
state: present
- name: nomad
version: 0.12.5
state: present
- name: packer
version: 1.6.4
state: present
- name: terraform
version: 0.13.4
state: absent
- name: vagrant
version: 2.2.10
state: present
- name: vault
version: 1.5.4
state: absent
- name: waypoint
version: 0.1.1
state: present
roles:
name: monolithprojects.hashicorp_tools
贡献
欢迎您贡献!:)
许可证
MIT
作者信息
由Michal Muransky在2020年创建
关于项目
Ansible Role used for Hashicorp tools installation/upgrade/uninstallation.
安装
ansible-galaxy install monolithprojects.hashicorp_tools
许可证
mit
下载
56.2k
拥有者
Full-time Cloud Engineer, part-time adventurer