- Security Automation with Ansible 2
- Madhu Akula Akash Mahajan
- 26字
- 2025-04-04 17:50:57
Conditional example
Execute only when the operating system family is Debian:
tasks: - name: "shut down Debian flavored systems" command: /sbin/shutdown -t now when: ansible_os_family == "Debian"