diff options
Diffstat (limited to 'containers.yml')
| -rw-r--r-- | containers.yml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/containers.yml b/containers.yml index 59de80c..c582178 100644 --- a/containers.yml +++ b/containers.yml @@ -1,5 +1,14 @@ - hosts: localhost + 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 tasks: - ansible.builtin.import_role: name: "containers" |
