3_3-jinja2_template.yml
2022/8/4 6:22:54
本文主要是介绍3_3-jinja2_template.yml,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
--- - hosts: all remote_user: root vars: http_packages: - httpd tasks: - name: install https form yum yum: name: "{{ http_packages }}" register: yum_httpd - name: enable & start httpd service service: name: httpd state: started when: yum_httpd['rc'] == 0 - name: open firewall for http firewalld: service: http permanent: yes state: enabled immediate: yes - name: open firewall for port-80 firewalld: port: 80/tcp permanent: yes state: enabled immediate: yes - name: copy template file-http_index.j2 to host template: src: /home/student/ansible_student/fiels/jinja2-http_index.j2 dest: /var/www/html/index.html owner: root group: root mode: 0644
这篇关于3_3-jinja2_template.yml的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-12-27数据结构与算法面试题详解及练习
- 2024-12-27网络请求面试题详解与实战
- 2024-12-27数据结构和算法面试真题详解与实战教程
- 2024-12-27网络请求面试真题解析与实战教程
- 2024-12-27数据结构和算法大厂面试真题详解与实战指南
- 2024-12-27TS大厂面试真题解析与应对策略
- 2024-12-27TS大厂面试真题详解与解析
- 2024-12-27网站安全入门:如何识别和修复漏洞
- 2024-12-27SQL注入基础教程
- 2024-12-27初学者指南:理解和修复跨域漏洞