简体   繁体   English

在 Windows 上的本地主机上运行 Ansible-Playbook

[英]Run Ansible-Playbook on localhost on Windows

I know Ansible supports Windows clients/nodes.我知道 Ansible 支持 Windows 客户端/节点。 What I really enjoy about Ansible is that I can create a Linux VM, pull a git repo that contains Ansible playbooks for and without any configuration or setup of a control server, I am able to run the playbook on the local machine.我真正喜欢 Ansible 的地方在于,我可以创建一个 Linux VM,拉出一个包含 Ansible playbook 的 git repo,无需任何配置或设置控制服务器,我就可以在本地机器上运行 playbook。

Since you can execute Python on Windows, would it be possible to run roles/playbooks on localhost on Windows?由于您可以在 Windows 上执行 Python,是否可以在 Windows 的本地主机上运行角色/剧本?

This would be the first step for running Ansible in a datacenter with only Windows where it is not possible to even run Linux in VirtualBox.这将是在只有 Windows 的数据中心运行 Ansible 的第一步,在那里甚至不可能在 VirtualBox 中运行 Linux。

Ansible won't run on a windows control machine, as stated in the documentation : Ansible 不会在 Windows 控制机器上运行,如文档所述

Reminder: You Must Have a Linux Control Machine提醒:你必须有一台 Linux 控制机

Note running Ansible from a Windows control machine is NOT a goal of the project.注意从 Windows 控制机器运行 Ansible 不是该项目的目标。 Refrain from asking for this feature, as it limits what technologies, features, and code we can use in the main project in the future.不要要求此功能,因为它限制了我们将来可以在主项目中使用的技术、功能和代码。 A Linux control machine will be required to manage Windows hosts.需要一台 Linux 控制机来管理 Windows 主机。

Cygwin is not supported, so please do not ask questions about Ansible running from Cygwin. Cygwin 不受支持,因此请不要询问有关从 Cygwin 运行的 Ansible 的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM