当前位置:网站首页>Ansible playbook syntax and format automate cloud computing
Ansible playbook syntax and format automate cloud computing
2022-04-23 10:03:00 【Database from deleting database to running】
YAML(yml) Language : (jinia2 Templates )
1) playbook By yml Grammar writing , The structure is clear , High readability , So you have to master yml Basic grammar
2) Indent : YAML Use a fixed indentation style to represent hierarchy , Each indentation consists of two spaces , Out of commission tabs
3) The colon : Except those ending with a colon , All other colons must be followed by spaces
4) Dash line : Represents a list item , Use a short bar with a space . Multiple items use the same indentation level as the same list
Modules with the same function Must be at the same level Strict alignment :
1) Script name
- name: The name or hint of the script Chinese or English (ansible-play When the terminal prompts )
such as :
- name: install httpd and create vhost
- name: install http And configure the virtual host
2) Which hosts to operate on
hosts: group1 ( Which hosts to operate on Host list /etc/ansible/inventory In the definition of [ The name defined in this square bracket ])
3) Which modules are called , What to do , One or more tasks tasks ( Installation configuration Configure the host Restart the service )
yum: install httpd
file: Delete file /etc/httpd/conf.d/welcome.conf
file: Create directory /data/web
copy: Generate home page content
template: Create a virtual host
service: Restart the service
版权声明
本文为[Database from deleting database to running]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230956066856.html
边栏推荐
- Realizing data value through streaming data integration (5) - stream processing
- 雨生百谷,万物生长
- PHP two-dimensional array specifies that the elements are added after they are equal, otherwise new
- Introduction to graph theory -- drawing
- 深度选择器
- shell脚本免交互
- 中控学习型红外遥控模块支持网络和串口控制
- 0704、ansible----01
- [ACM-ICPC 2018 Shenyang Network preliminaries] J. Ka Chang (block + DFS sequence)
- MapReduce计算流程详解
猜你喜欢

Planning and construction of industrial meta universe platform

防疫登记小程序

"Gu Yu series" airdrop

Comparative analysis of meta universe from the dimension of knowledge dissemination

Solving Lucas number and combination theorem

Failureforwardurl and failureurl

一文看懂 LSTM(Long Short-Term Memory)

0704、ansible----01

工业元宇宙平台规划与建设

深度选择器
随机推荐
最长公共前串
打印页面的功能实现
[2020wc Day2] F. Clarice picking mushrooms (subtree and query, light and heavy son thought)
Construire neuf capacités de fabrication agile à l'ère métacosmique
DBA常用SQL语句(3)- cache、undo、索引和等待事件
工业元宇宙平台规划与建设
杰理之用户如何最简单的处理事件【篇】
Depth selector
通过流式数据集成实现数据价值(2)
MapReduce压缩
Sim Api User Guide(5)
lnmp的配置
使用IDEA开发Spark程序
[CF 1425d] danger of mad snakes
2022年上海市安全员C证考试题库及答案
第一章 Oracle Database In-Memory 相关概念(IM-1.1)
Realizing data value through streaming data integration (5) - flow analysis
Windows安装redis并将redis设置成服务开机自启
GCD of p2257 YY (Mobius inversion)
Career planning and implementation in the era of meta universe