community.general.rollbar_deployment 模块 – 通知 Rollbar 应用部署
注意
此模块是 community.general 集合 (版本 10.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install community.general
。
要在 playbook 中使用它,请指定: community.general.rollbar_deployment
。
概要
通知 Rollbar 应用部署 (参见 https://rollbar.com/docs/deploys_other/)
参数
参数 |
注释 |
---|---|
部署注释(例如,正在部署的内容)。 |
|
正在部署的环境名称,例如“production”。 |
|
正在部署的修订号/sha。 |
|
执行部署用户的 Rollbar 用户名。 |
|
您的项目访问令牌。 |
|
可选的提交通知的 URL。 默认值: |
|
执行部署的用户。 |
|
如果为 选项
|
属性
属性 |
支持 |
描述 |
---|---|---|
支持:完全支持 |
可以在 |
|
支持:不支持 |
处于 diff 模式时,将返回有关已更改内容(或可能需要在 |
示例
- name: Rollbar deployment notification
community.general.rollbar_deployment:
token: AAAAAA
environment: staging
user: ansible
revision: '4.2'
rollbar_user: admin
comment: Test Deploy
- name: Notify rollbar about current git revision deployment by current user
community.general.rollbar_deployment:
token: "{{ rollbar_access_token }}"
environment: production
revision: "{{ lookup('pipe', 'git rev-parse HEAD') }}"
user: "{{ lookup('env', 'USER') }}"