12 lines
348 B
YAML
Executable File
12 lines
348 B
YAML
Executable File
---
|
|
- name: Stop container if it is running
|
|
community.proxmox.proxmox:
|
|
vmid: "{{ lxc_vmid | default(omit) }}"
|
|
hostname: "{{ lxc_hostname | default(omit) }}"
|
|
state: stopped
|
|
register: stop_result
|
|
failed_when: |-
|
|
stop_result.failed and
|
|
('not running' not in stop_result.msg) and
|
|
('does not exist' not in stop_result.msg)
|