diff options
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" |
