Files
oam/snippets/ansible/tasks/delegate tasks to other hosts.yml
2026-02-08 15:48:16 +01:00

16 lines
359 B
YAML

---
# Only *single* target patterns allowed
# No groups
- name: Forcefully run on the controller
delegate_to: 127.0.0.1 # or 'localhost'
connection: local
changed_when: false
ansible.builtin.command: hostname
- name: Forcefully run on a target from the inventory
delegate_to: copernicus
changed_when: false
ansible.builtin.command: hostname