This commit is contained in:
2025-11-06 08:53:48 +02:00
parent ed5eb19017
commit 1e726af9db

View File

@@ -0,0 +1,25 @@
---
- name: Temporarily move cloud-agent and restore it
hosts: all
gather_facts: no
tasks:
- name: Move /tmp/launchd/services/cloud-agent to /root/
ansible.builtin.raw: |
set -e
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
mv -f /tmp/launchd/services/cloud-agent /root/
register: move_out
changed_when: true
- name: Wait 3s before restoring
ansible.builtin.pause:
seconds: 3
- name: Move /root/cloud-agent back to /tmp/launchd/services/
ansible.builtin.raw: |
set -e
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH
mv -f /root/cloud-agent /tmp/launchd/services/
register: move_back
changed_when: true