当前位置: 首页 > news >正文

Ubuntu 安装Ansible ansible.cfg配置文件生成

安装后的ansible.cfg后的默认内容如下:

root@localhost:/etc/ansible# cat ansible.cfg
# Since Ansible 2.12 (core):
# To generate an example config file (a "disabled" one with all default settings, commented out):
#               $ ansible-config init --disabled > ansible.cfg
#
# Also you can now have a more complete file by including existing plugins:
# ansible-config init --disabled -t all > ansible.cfg# For previous versions of Ansible you can check for examples in the 'stable' branches of each version
# Note that this file was always incomplete  and lagging changes to configuration settings# for example, for 2.9: https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg

这个配置文件没有任何配置信息。但是注释的内容很有用,翻译如下:

#自Ansible 2.12 (core):
#生成一个示例配置文件(一个带有所有默认设置的“禁用”配置文件,注释掉):
# $ ansible-config init —q --disabled > ansible.cfg
#
#你也可以有一个更完整的文件,包括现有的插件:
# ansible-config init --disabled -t all  > ansible.cfg对于以前版本的Ansible,你可以在每个版本的“stable”分支中查看示例
请注意,这个文件总是不完整的,并且滞后于配置设置的更改#例如,对于2.9:https://github.com/ansible/ansible/blob/stable-2.9/examples/ansible.cfg

使用 ansible-config init —q --disabled > ansible.cfg 和 ansible-config init --disabled -t all > ansible.cfg都可以生成ansible.cfg文件,上述翻译有介绍。

生成的配置文件都是被注释的,走的都是默认值;可以使用 ansible-config dump 查看参数的值;
如下:

root@localhost:/etc/ansible# ansible-config dump | grep -i forks
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 5

forks 当前的值为5,调用的配置文件路径 /etc/ansible/ansible.cfg

http://www.lryc.cn/news/497403.html

相关文章:

  • 使用PaddlePaddle实现线性回归模型
  • MongoDB集群的介绍与搭建
  • PhpStorm配置Laravel
  • Solving the Makefile Missing Separator Stop Error in VSCode
  • MySQL大小写敏感、MySQL设置字段大小写敏感
  • 项目搭建:guice,jdbc,maven
  • 第四届新生程序设计竞赛正式赛(C语言)
  • 【分布式知识】Redis6.x新特性了解
  • 程序员需要具备哪些知识?
  • 实验四:MyBatis 的关联映射
  • 【Leetcode】189.轮转数组
  • 【JavaSE】常见面试问题
  • 【超详图文】多少样本量用 t分布 OR 正态分布
  • leetcode hot100【Leetcode 416.分割等和子集】java实现
  • 《算法导论》英文版前言To the teacher第4段研习录:有答案不让用
  • Laravel关联模型查询
  • Clickhouse 数据类型
  • 物联网智能项目如何实现设备高效互联与数据处理?
  • 【云服务器】搭建博客服务
  • 如何抽象策略模式
  • BERT模型的输出格式探究以及提取出BERT 模型的CLS表示,last_hidden_state[:, 0, :]用于提取每个句子的CLS向量表示
  • node.js实现分页,jwt鉴权机制,token,cookie和session的区别
  • 34 基于单片机的指纹打卡系统
  • 【Linux】用户操作命令
  • Y20030018基于Java+Springboot+mysql+jsp+layui的家政服务系统的设计与实现 源代码 文档
  • windows部署PaddleSpeech详细教程
  • 线程条件变量 生产者消费者模型 Linux环境 C语言实现
  • C++ packaged_task
  • 【联表查询】.NET开源 ORM 框架 SqlSugar 系列
  • 嵌入式C编程:宏定义与typedef的深入对比与应用