aboutsummaryrefslogtreecommitdiff
path: root/host.yml
diff options
context:
space:
mode:
authorspmfox <spmfox@foxwd.com>2025-05-15 17:16:45 -0400
committerspmfox <spmfox@foxwd.com>2025-05-15 17:16:45 -0400
commite53c324dae5957a99f6ecbb0ad88246c204da42f (patch)
tree7def0197925f600c92092ee43573eaf309abc1bf /host.yml
parent9af1708e2f67af6c44e800d6960ad3fc962b3386 (diff)
Updating readme, documentation, and a localhost warning - formalizing changes made for remote runsHEADmain
Diffstat (limited to 'host.yml')
-rw-r--r--host.yml17
1 files changed, 11 insertions, 6 deletions
diff --git a/host.yml b/host.yml
index af0d4a8..f859cd3 100644
--- a/host.yml
+++ b/host.yml
@@ -1,13 +1,18 @@
- hosts: localhost
gather_facts: false
+ vars:
+
tasks:
- - name: Add localhost to all group if no hosts are defined
- ansible.builtin.add_host:
- name: "localhost"
- ansible_connection: "local"
+ - name: Block for localhost run
+ block:
+ - ansible.builtin.pause:
+ prompt: "Warning - no hosts were given, this will run on localhost - hit enter to continue or ctrl-c to cancel"
+
+ - name: Add localhost to all group if no hosts are defined
+ ansible.builtin.add_host:
+ name: "localhost"
+ ansible_connection: "local"
when: groups['all'] | length == 0
- tags:
- - always
- hosts: all