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

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

问题描述

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

Ansible supports custom modules written in Python .

对于本地(本地均值连接)的执行类型:本地& 主机: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. 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天全站免登陆