community / community.general / 2.5.9 / module / shutdown Shut down a machine | "added in version" 1.1.0 of community.general" Authors: Matt Davis (@nitzmahone), Sam Doran (@samdoran), Amin Vakil (@aminvakil) This plugin has a corresponding action plugin.community.general.shutdown (2.5.9) — module
Install with ansible-galaxy collection install community.general:==2.5.9
collections: - name: community.general version: 2.5.9
Shut downs a machine.
- name: Unconditionally shut down the machine with all defaults community.general.shutdown:
- name: Delay shutting down the remote node community.general.shutdown: delay: 60
- name: Shut down a machine with shutdown command in unusual place community.general.shutdown: search_paths: - '/lib/molly-guard'
msg: default: Shut down initiated by Ansible description: - Message to display to users before shutdown. type: str delay: default: 0 description: - Seconds to wait before shutdown. Passed as a parameter to the shutdown command. - On Linux, macOS and OpenBSD, this is converted to minutes and rounded down. If less than 60, it will be set to 0. - On Solaris and FreeBSD, this will be seconds. type: int search_paths: default: - /sbin - /usr/sbin - /usr/local/sbin description: - Paths to search on the remote machine for the C(shutdown) command. - I(Only) these paths will be searched for the C(shutdown) command. C(PATH) is ignored in the remote node when searching for the C(shutdown) command. elements: path type: list
shutdown: description: C(true) if the machine has been shut down. returned: always sample: true type: bool