diff options
| author | spmfox <spmfox@foxwd.com> | 2024-08-28 17:51:39 -0400 |
|---|---|---|
| committer | spmfox <spmfox@foxwd.com> | 2024-08-28 17:51:39 -0400 |
| commit | 2cccdbb42ff3b7a87210bda57870a455fc54147a (patch) | |
| tree | 5d17be855a5620ddcfdbc3659b22e01c4cd4970f /host.yml | |
| parent | 5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 (diff) | |
removing podman collection requirement, plays are now smarter and work with localhost (default) or remote hosts
Diffstat (limited to 'host.yml')
| -rw-r--r-- | host.yml | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,6 +1,15 @@ - hosts: localhost - become: true + gather_facts: false + tasks: + - 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 + +- hosts: all + become: true tasks: - ansible.builtin.import_role: name: "host" |
