- Security Automation with Ansible 2
- Madhu Akula Akash Mahajan
- 123字
- 2021-07-02 21:59:51
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.
推薦閱讀
- Seven NoSQL Databases in a Week
- 3D Printing with RepRap Cookbook
- 嵌入式Linux上的C語言編程實踐
- Google App Inventor
- OpenStack Cloud Computing Cookbook(Second Edition)
- Photoshop CS3圖像處理融會貫通
- CompTIA Linux+ Certification Guide
- 信息物理系統(CPS)測試與評價技術
- Prometheus監控實戰
- Google SketchUp for Game Design:Beginner's Guide
- 網中之我:何明升網絡社會論稿
- Spatial Analytics with ArcGIS
- 手把手教你學Photoshop CS3
- 菜鳥起飛電腦組裝·維護與故障排查
- 算法設計與分析