问题标签 [ansible-tower]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3496 浏览

ansible - Ansible Tower 找不到我的角色

我有我的目录结构设置,使得 playbooks 目录位于/var/lib/awx/projects/并且角色是 playbooks 下的符号链接。

我需要角色的符号链接,因为我使用本地系统中的 git push 推playbooks/roles送到 Tower,并且剧本和角色都在不同的 git repo 下。

当我尝试在 Tower 中运行工作时,它抱怨说找不到我的角色。当我查看 ansible 声明它已查看的每条路径时,它们就在那里。

任何想法为什么找不到我的角色?

0 投票
3 回答
30578 浏览

ansible - Ansible:在角色目录中的目录中调用角色的剧本

我想塑造我的 ansible 角色和剧本的目录结构。

目前我有一个类似的目录结构。

我希望能够召唤剧中的java_role1角色deploy_fun_java_stuff.yml

我可以打电话

但我不能打电话(我尝试了多种方式)。这可能吗?


我真正想要完成的是能够按照我的角色有条不紊地组织我的戏剧。我最终会得到大量我想组织的角色和戏剧。

我可以为每个播放目录使用单独的 ansible.cfg 文件来处理这个问题,但我无法将这些 cfg 文件添加到 ansible Tower(所以我正在寻找替代解决方案)。

0 投票
2 回答
1757 浏览

ansible - 使用 Ansible Tower REST API 创建清单源

我正在尝试使用 Ansible Tower REST API 来配置 Tower 实例以从 EC2 中提取库存。但是,REST API 仅记录了获取 Inventory Source 的方法,我似乎找不到创建方法。当前的 API 是否可以做到这一点,如果可以,我该怎么做?

0 投票
1 回答
1639 浏览

ansible - 从 Ansible Inventory 中排除特定虚拟机:VMware

我在 Ansible Tower 中配置了一个源“VMware vCenter”的组。根据文档,可以指定源变量

覆盖在 vmware.ini 中找到并由清单更新脚本使用的变量。有关这些变量的详细说明,请查看Ansible github 存储库中的 vmware.ini

GitHub文件的摘录-

就我而言,我至少需要排除三个前缀。但是,当我尝试通过指定 prefix_filter 三次来做到这一点时,似乎只有第一个有效。如何排除以 Te 以外的名称开头的 VM?

在此处输入图像描述

0 投票
1 回答
1025 浏览

ansible - Ansible Tower 暴露密码

在我的一本 Ansible Playbook 中,我使用该vmware_guest模块在 vCenter Server 上创建 VM。当我使用作业模板在 Ansible Tower 上运行 Playbook 并检查主机事件时,我看到了纯文本密码

在此处输入图像描述

我没有在 Playbook 中以纯文本形式提供密码。事实上,它存储在 Ansible Tower 的“Credentials”部分中,显示为已加密。作业模板设置为使用“云凭据”下的此凭据。

在此处输入图像描述

如何避免密码显示在主持人活动中?

0 投票
1 回答
798 浏览

amazon-web-services - Deploying cloudformation stack to AWS using Ansible Tower

I'm new to Ansible, Ansible Tower, and AWS Cloud Formation and am trying to have Ansible Tower deploy an EC2 Container Service using a Cloud Formation template. I try to run the deploy job and am running into this error below.

This is the create/update task:

The playbook that Ansible Tower executes is a site.yml file:

This is what my playbook folder structure looks like:

I'm basing everything really on Justin Menga's pluralsight course "Continuous Delivery using Docker and Ansible", but he uses Jenkins, not Ansible Tower, which is probably why the disconnect. Anyway, hopefully that is enough information, let me know if I should also provide the stack.yml file. The files under the library directory are Menga's customized modules from his video course.

Thanks for reading all this and for any potential help! This is a link to his deploy playbook repository that I closely modeled everything after, https://github.com/jmenga/todobackend-deploy. Things that I took out are the DB RDS stuff.

0 投票
1 回答
885 浏览

python - Windows 10 上的 Ansible tower-cli - tower-cli' 未被识别为内部或外部命令

从这个链接:https://github.com/ansible/tower-cli/,您使用 pip install ansible-tower-cli 安装 tower-cli 但是当您运行以下命令时tower-cli config host www.myWebsite.com

你得到这个错误:tower-cli' is not recognized as an internal or external command, 14-Sep-2016 15:41:49 operable program or batch file.

我知道该错误意味着我需要将该可执行文件的位置添加到我认为我使用的 Windows PATH 中:

在此处输入图像描述

但仍然是同样的错误,有什么想法吗?

0 投票
1 回答
464 浏览

powershell - 此命令的 Power shell 等效命令

带有回调 url 的用户数据,我用于使用 ansible tower 配置 linux ec2 实例:

上面,回调 url 在塔中工作并取回配置。

我如何使用 Windows ec2 实例执行此操作,如何使用我可以放入我的用户数据的 powershell 脚本发送相同类型的请求,该脚本可以在塔中打电话并取回配置。

0 投票
1 回答
3784 浏览

ansible - Ansible Tower Permission denied: '/var/lib/awx/projects' 即使有权访问

当我尝试登录 Ansible Tower 或四处导航时,我收到 500 错误。节目/var/log/tower.log

但该/var/lib/awx/projects目录完全归awx用户所有。

有没有人经历过这个?有什么方法可以解决?谢谢!

0 投票
1 回答
116 浏览

amazon-web-services - Ansible Tower 未在 ec2-remote-facts 模块中正确注册变量

当我不在 Ansible Tower 上运行 ec2-remote-facts 模块时,它可以正常工作。下面的第一个示例(不使用 Tower)包含我在后续任务中使用的所有 block_device_mapping 信息。

从长远来看,这是我要使用 Tower 的一个大问题。我的代码对于两个示例都是相同的。任何可以引导我走向正确方向的想法。

我唯一的想法是,由于它不是核心模块,Ansible Tower 并没有完美地同步到模块的最新代码。但我很困惑。谢谢!

Ansible 版本 - ansible 2.2.0.0(在 Ubuntu 上运行)

Ansible Tower 版本 - Tower 版本 3.0.3(在 Centos 上运行)

---下面的例子----

-Ansible(不使用 Tower)-

Ansible Tower(注意它缺少 block_device_mapping 代码块)