50 lines
1.8 KiB
YAML
50 lines
1.8 KiB
YAML
---
|
|
- name: Kali Linux 完整测试套件
|
|
hosts: localhost
|
|
gather_facts: no
|
|
tasks:
|
|
- name: 显示测试开始信息
|
|
debug:
|
|
msg: "开始执行 Kali Linux 完整测试套件"
|
|
|
|
- name: 执行Kali快速健康检查
|
|
command: "ansible-playbook -i ../inventories/production/inventory.ini kali-health-check.yml"
|
|
args:
|
|
chdir: "/root/mgmt/configuration/playbooks/test"
|
|
register: health_check_result
|
|
|
|
- name: 显示健康检查结果
|
|
debug:
|
|
msg: "健康检查完成,退出码: {{ health_check_result.rc }}"
|
|
|
|
- name: 执行Kali安全工具测试
|
|
command: "ansible-playbook -i ../inventories/production/inventory.ini kali-security-tools.yml"
|
|
args:
|
|
chdir: "/root/mgmt/configuration/playbooks/test"
|
|
register: security_tools_result
|
|
|
|
- name: 显示安全工具测试结果
|
|
debug:
|
|
msg: "安全工具测试完成,退出码: {{ security_tools_result.rc }}"
|
|
|
|
- name: 执行Kali完整系统测试
|
|
command: "ansible-playbook -i ../inventories/production/inventory.ini test-kali.yml"
|
|
args:
|
|
chdir: "/root/mgmt/configuration/playbooks/test"
|
|
register: full_test_result
|
|
|
|
- name: 显示完整测试结果
|
|
debug:
|
|
msg: "完整系统测试完成,退出码: {{ full_test_result.rc }}"
|
|
|
|
- name: 显示测试完成信息
|
|
debug:
|
|
msg: |
|
|
Kali Linux 完整测试套件执行完成!
|
|
|
|
测试结果摘要:
|
|
- 健康检查: {{ '成功' if health_check_result.rc == 0 else '失败' }}
|
|
- 安全工具测试: {{ '成功' if security_tools_result.rc == 0 else '失败' }}
|
|
- 完整系统测试: {{ '成功' if full_test_result.rc == 0 else '失败' }}
|
|
|
|
详细测试结果请查看各测试生成的报告文件。 |