From 2cccdbb42ff3b7a87210bda57870a455fc54147a Mon Sep 17 00:00:00 2001 From: spmfox Date: Wed, 28 Aug 2024 17:51:39 -0400 Subject: removing podman collection requirement, plays are now smarter and work with localhost (default) or remote hosts --- host.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'host.yml') diff --git a/host.yml b/host.yml index f2dea0a..61f9063 100644 --- a/host.yml +++ b/host.yml @@ -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" -- cgit