当前位置:网站首页>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
边栏推荐
- DBA常用SQL语句(1)— 概况信息
- Explanation of order and primitive root of number theory
- MapReduce计算流程详解
- 第二章 Oracle Database In-Memory 体系结构(上) (IM-2.1)
- DBA常用SQL语句 (5) - Latch 相关
- Comparative analysis of meta universe from the dimension of knowledge dissemination
- 杰理之用户如何最简单的处理事件【篇】
- The central control learning infrared remote control module supports network and serial port control
- Common SQL statements of DBA (6) - daily management
- 一文读懂PlatoFarm新经济模型以及生态进展
猜你喜欢
Windows安装redis并将redis设置成服务开机自启
自定义登录失败处理
2022年上海市安全员C证考试题库及答案
论文阅读《Integrity Monitoring Techniques for Vision Navigation Systems》——5结果
Interviewer: let's talk about some commonly used PHP functions. Fortunately, I saw this article before the interview
Number theory blocking (integer division blocking)
计算机网络安全实验二|DNS协议漏洞利用实验
Yarn资源调度器
Chinese Remainder Theorem and extended Chinese remainder theorem that can be understood by Aunt Baojie
Sim Api User Guide(6)
随机推荐
Juc并发编程06——深入剖析队列同步器AQS源码
MapReduce核心和基础Demo
Exercise questions and simulation test of refrigeration and air conditioning equipment operation test in 2022
[untitled]
DBA common SQL statements (2) - SGA and PGA
自定义登录失败处理
深度选择器
Introduction to graph theory -- drawing
Sim Api User Guide(8)
通过流式数据集成实现数据价值(5)- 流分析
杰理之有时候定位到对应地址的函数不准确怎么办?【篇】
[COCI] Vje š TICA (subset DP)
art-template 模板引擎
DBA常用SQL语句(4)- Top SQL
CSP认证 202203-2 出行计划(多种解法)
Juc并发编程07——公平锁真的公平吗(源码剖析)
Mobius inversion
Depth selector
Skill point digging
Sim Api User Guide(4)