所有Ansible剧本属性 [英] All Ansible playbook attributes

查看:85
本文介绍了所有Ansible剧本属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始使用Ansible,在阅读了教程(Ansible团队将其命名为"docs" )之后,我希望看到可以在剧本中使用的所有属性的完整列表.有人可以提供这样的清单吗?我唯一能够使用Google的是这个旧示例,但是它缺少.

也许经验丰富的人可以在此处粘贴具有包含所有属性的正确结构的骨骼".

预先感谢.

I've just started using Ansible, and after reading the tutorial (which Ansible Team named "docs") I would like to see the full list of all attributes which can be used in playbooks. Is someone able to provide such a list? The only one I was able to Google was this old example but it lack the things like gather_facts.

Maybe someone experienced could paste here a 'skeleton' with the correct structure containing all the atributes.

Thanks in advance.

推荐答案

您始终可以查看还请注意,Play类继承了BaseTaggableBecome.
因此,所有这些类的属性也都可以播放.

Also note that Play class inherits Base, Taggable and Become.
So all those classes' attributes are also available to plays.

更新:

这是我在另一个问题中建议的Python oneliner:

Here is a Python oneliner suggested by me in another question:

python -c 'import ansible.playbook.play as P; print P.Play()._valid_attrs.keys();'

这篇关于所有Ansible剧本属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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