qiyutech.core.check_os module – 检查是否支持远程服务器的操作系统¶
备注
This module is part of the qiyutech.core collection (version 1.0.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install qiyutech.core.
To use it in a playbook, specify: qiyutech.core.check_os.
1.0.0 新版功能: of qiyutech.core
Synopsis¶
这个模块会根据 os.toml 的内容检测目标服务器是否允许继续执行
备注
This module has a corresponding action plugin.
Notes¶
备注
这个模块支持 Windows 系统
See Also¶
参见
- ansible.builtin.assert
The official documentation on the ansible.builtin.assert module.
Examples¶
- name: 检测目标服务器是否满足系统要求
qiyutech.core.check_os:
- name: 检测目标服务器是否满足系统要求
qiyutech.core.check_os:
environment:
QIYU_AUTOMATION_DIR: /path/to/automation/dir
- name: 检测目标服务器是否满足系统要求
qiyutech.core.check_os:
when: skip_os_check != true