1分钟
02 templates模板
功能:根据模块文件动态生成对应的配置文件
使用方法:
(1)templates文件必须存放在templates目录下,且以.j2为后缀
(2)templates模块只能被playbook调用
(3)yam文件需和templates目录平级,目录结构如下:
./
├── temnginx.yml
└── templates
└── nginx.conf.j2
功能:根据模块文件动态生成对应的配置文件
使用方法:
(1)templates文件必须存放在templates目录下,且以.j2为后缀
(2)templates模块只能被playbook调用
(3)yam文件需和templates目录平级,目录结构如下:
./
├── temnginx.yml
└── templates
└── nginx.conf.j2
Copyright © 2013-2026 Tencent Cloud.All Rights Reserved. 腾讯云 版权所有
学员评价