From 9c638deee31fac74c5793033d7eb27fdd2d60ea8 Mon Sep 17 00:00:00 2001 From: Noah Knegt Date: Fri, 12 Apr 2024 19:37:45 +0200 Subject: [PATCH] Correctly specify localhost Signed-off-by: Noah Knegt --- inventory/hosts.yml | 5 ++--- site.yml | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/inventory/hosts.yml b/inventory/hosts.yml index 75d1a6c..91448c1 100644 --- a/inventory/hosts.yml +++ b/inventory/hosts.yml @@ -26,9 +26,8 @@ pis: localhost: hosts: - localhost: - ansible_user: ansible - ansible_host: 127.0.0.1 + localhost-machine: + ansible_connection: local all: children: diff --git a/site.yml b/site.yml index 9858652..f898c33 100644 --- a/site.yml +++ b/site.yml @@ -9,7 +9,7 @@ --- - name: Setup - hosts: datacenter + hosts: all remote_user: root roles: - role: setup @@ -17,7 +17,7 @@ # Clean up the system - name: Cleanup - hosts: datacenter + hosts: all remote_user: ansible become: true tasks: