当前位置:网站首页>AUTOMATION DAY06 (Ansible Advanced, Ansible Role)

AUTOMATION DAY06 (Ansible Advanced, Ansible Role)

2022-08-11 06:59:00 zoujiangMr

Case 1: Ansible Application Case
Case 2: Ansible Roles

1 Case 1: Ansible application case

1.1 Question
This case requires more advanced grammar knowledge of Ansible, the specific requirements are as follows:

  1. Familiar with firewalld and template modules
  2. Familiar with the error handling mechanism
  3. Familiar with handler tasks
  4. Familiar with when conditional judgment
  5. Familiar with the block task block
  6. Familiar with how to use the loop loop

1.2 Steps
The following steps are required to implement this case.

Step 1: firewalld module

Use the firewalld module to configure firewall policies.

[[email protected] ~]# vim ~/ansible/firewall.yml---- hosts: test #hosts defines the hosts that need to be remotetasks: 
原网站

版权声明
本文为[zoujiangMr]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/223/202208110516597477.html