ansible 是否支持用 Go 编写的模块? [英] Does ansible support modules written in Go?

查看:25
本文介绍了ansible 是否支持用 Go 编写的模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ansible 支持用 Python 编写的自定义模块.

Ansible supports custom modules written in Python .

对于本地的执行类型(本地意味着connection: local & hosts: localhost),ansible ssh 的 python 包到远程节点,每次播放.

For execution types which are not local( local mean connection: local & hosts: localhost), ansible ssh's python packages to remote node, for every play.

  1. ansible 是否支持在 Go 中编写模块?

  1. Does ansible support writing modules in Go?

如果是,这些模块可以远程执行类型吗?因为 Go 工件是二进制工件.

if yes, can these modules be remote execution type? Because Go artifacts are binary artifacts.

推荐答案

任务是使用模块实现的.大多数模块都是用 Python 编写的,但您可以根据需要使用其他语言.

Tasks are implemented using modules. Most modules are written in Python, but you can use another language if you wish.

来自构建简单模块 指南,它指出:

From the Building A Simple Module guide, it states:

我们将在这里使用 Python,但任何语言都是可能的.只需要文件 I/O 和输出到标准输出.所以,bash、C++、clojure、Python、Ruby,任何你想要的都可以.

We are going to use Python here but any language is possible. Only File I/O and outputting to standard out are required. So, bash, C++, clojure, Python, Ruby, whatever you want is fine.

这篇关于ansible 是否支持用 Go 编写的模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆