weareinteractive.environment
Ansible weareinteractive.environment 角色
weareinteractive.environment
是一个 Ansible 角色,它:
- 添加
/etc/environment
变量
注意:
自从 Ansible Galaxy 将所有角色名称切换到组织名称后,此角色已从
franklinkim.environment
移动到weareinteractive.environment
!
安装
使用 ansible-galaxy
:
$ ansible-galaxy install weareinteractive.environment
使用 requirements.yml
:
- src: weareinteractive.environment
使用 git
:
$ git clone https://github.com/weareinteractive/ansible-environment.git weareinteractive.environment
依赖
- Ansible >= 2.4
变量
以下是该角色的所有默认变量列表,这些变量也在 defaults/main.yml
中可用。
---
# 环境文件的路径
environment_file: /etc/environment
# 环境文件的所有者
environment_file_owner: root
# 环境文件的组
environment_file_group: root
# 配置参数的字典,例如
#
# environment_config:
# LC_ALL: en_US.UTF-8
# PATH: "/your/path:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games/"
environment_config: {}
使用
以下是一个示例剧本:
---
- hosts: all
roles:
- weareinteractive.environment
vars:
environment_config:
LC_ALL: C
测试
$ git clone https://github.com/weareinteractive/ansible-environment.git
$ cd ansible-environment
$ make test
贡献
没有正式的风格指南,请注意保持现有编码风格。为任何新功能或更改功能添加单元测试和示例。
- 先 Fork
- 创建你的功能分支 (
git checkout -b my-new-feature
) - 提交你的更改 (
git commit -am '添加一些功能'
) - 推送到该分支 (
git push origin my-new-feature
) - 创建新的拉取请求
注意:要更新 README.md
文件,请安装并运行 ansible-role
:
$ gem install ansible-role
$ ansible-role docgen
许可
版权所有 (c) We Are Interactive,采用 MIT 许可。
安装
ansible-galaxy install weareinteractive.environment
许可证
mit
下载
342.3k