diff options
| author | spmfox <spmfox@foxwd.com> | 2025-05-15 17:16:45 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2025-05-15 17:16:45 -0400 |
| commit | e53c324dae5957a99f6ecbb0ad88246c204da42f (patch) | |
| tree | 7def0197925f600c92092ee43573eaf309abc1bf /host.yml | |
| parent | 9af1708e2f67af6c44e800d6960ad3fc962b3386 (diff) | |
Updating readme, documentation, and a localhost warning - formalizing changes made for remote runsHEADmain
Diffstat (limited to 'host.yml')
| -rw-r--r-- | host.yml | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -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 |
