robertdebock.awx_configuration
Ansible 角色 awx_configuration
配置 AWX。
GitHub | GitLab | 下载 | 版本 |
---|---|---|---|
示例剧本
此示例来自 molecule/default/converge.yml
,并在每次推送、拉取请求和发布时测试。
---
- name: Converge
hosts: all
become: true
gather_facts: true
roles:
- role: robertdebock.awx_configuration
awx_configuration_ci: true
awx_configuration_organizations:
- name: 我的组织
description: 我的组织描述
# galaxy_credentials:
# - 我的 Galaxy 凭证
awx_configuration_credentials:
- name: 我的凭证
description: 我的凭证描述
organization: 我的组织
credential_type: 机器
- name: 我的 Galaxy 凭证
description: 我的 Galaxy 凭证描述
credential_type: Ansible Galaxy/Automation Hub API 令牌
机器需要准备好。在 CI 中,这通过 molecule/default/prepare.yml
完成:
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: robertdebock.bootstrap
请查看 完整解释和示例,了解如何使用这些角色。
角色变量
变量的默认值在 defaults/main.yml
中设置:
---
# awx_configuration 的默认文件
# 要连接的 AWX 实例的主机名(实际上是 URL)。
awx_configuration_controller_host: "http://localhost"
# AWX 的凭据。
awx_configuration_controller_password: "My_P@ssw0rd"
awx_configuration_controller_username: admin
# 注意:一个组织可以引用一个凭证,而一个凭证可以引用一个组织。
# 这实际上是一个循环依赖关系,该 Ansible 角色无法解决。
# 你可能需要运行两次剧本:
# - 首先创建凭证
# - 然后创建组织。
# (或反过来。)
# 要在 AWX 中创建的组织列表。
awx_configuration_organizations: []
# 要在 AWX 中创建的凭证列表。
awx_configuration_credentials: []
# 在 CI 中测试此角色是困难的,AWX 不可用。
awx_configuration_ci: false
要求
- requirements.txt 中列出的 pip 包。
使用的角色状态
以下角色用于准备系统。您可以以其他方式准备您的系统。
要求 | GitHub | GitLab |
---|---|---|
robertdebock.bootstrap |
上下文
该角色是多个兼容角色的一部分。有关更多信息,请查看 这些角色的文档。
以下是相关角色的概述:
兼容性
此角色已在以下 容器镜像 上进行了测试:
容器 | 标签 |
---|---|
Alpine | 所有 |
Amazon | 候选 |
Debian | 所有 |
EL | 9 |
Fedora | 所有 |
Ubuntu | 所有 |
所需的最低 Ansible 版本为 2.12,测试已在:
- 之前的版本。
- 当前版本。
- 开发版本。
如果您发现问题,请在 GitHub 上注册。
许可证
作者信息
请考虑 赞助我。
安装
ansible-galaxy install robertdebock.awx_configuration
许可证
apache-2.0
下载
69
拥有者
I know my way around (Linux) infrastructure, have a passion for automation, Docker, Ansible, Molecule and ci/cd.