From 0efd688151a3f93cda226e6bc86490a6f3110ba1 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 22 Jan 2023 16:32:57 +0100 Subject: Use http.query instead of nbroles module This is an attempt to remove the need for the custom nbroles module. If it works out, the localhost reference should be replaced with a global roles API endpoint. Signed-off-by: Georg Pfuetzenreuter --- salt/top.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'salt') diff --git a/salt/top.sls b/salt/top.sls index 632d4a2..6b92f79 100644 --- a/salt/top.sls +++ b/salt/top.sls @@ -1,5 +1,5 @@ {%- set id = salt['grains.get']('id') -%} -{%- set roles = salt['nbroles.get'](id) -%} +{%- set roles = salt['http.query']('http://127.0.0.1:5000/roles', decode=True, decode_type='json', params={"machine": id})['dict']['roles'] -%} {{ saltenv }}: '*': -- cgit v1.2.3