Files
env-ansible/tasks/general/tests/lock_check.yml
T
2026-10-02 11:26:43 -07:00

17 lines
439 B
YAML

---
# 20260929 - Hyperling
# Ensure an existing run is not active, otherwise bail.
- name: General | Tests | Existing Run | Facts
ansible.builtin.set_fact:
lock_file: "/tmp/ansible-playbook.lock"
- name: General | Tests | Existing Run | Check
ansible.builtin.stat:
path: "{{ lock_file }}"
register: lock_exists
- name: General | Tests | Existing Run | Exit
ansible.builtin.meta: end_play
when: lock_exists.stat.exists