官术网_书友最值得收藏!

Templates with Jinja2

Ansible uses Jinja2 templating to enable dynamic expressions and access to variables. Jinja2 variables and expressions within playbooks and tasks allow us to create roles that are very flexible. By passing variables to a role written this way, we can have the same role perform different tasks or configurations. Using a templating language, such as Jinja2, we are able to write playbooks that are succinct and easier to read.

By ensuring that all the templating takes place on the Ansible controller, Jinja2 is not required on the target machine. Only the required data is copied over, which reduces the data that needs to be transferred. As we know, less data transfer usually results in faster execution and feedback. 

主站蜘蛛池模板: 横山县| 阳信县| 武胜县| 汕头市| 个旧市| 忻州市| 武强县| 山西省| 离岛区| 新疆| 南皮县| 汕尾市| 彭阳县| 白朗县| 北票市| 靖江市| 三门县| 安阳县| 呼玛县| 曲阳县| 咸宁市| 慈利县| 锡林浩特市| 莱州市| 嘉禾县| 丹江口市| 内丘县| 阳山县| 井研县| 农安县| 肇庆市| 墨竹工卡县| 江西省| 拉孜县| 平度市| 且末县| 开原市| 平湖市| 漠河县| 靖边县| 昌乐县|