From f6525f6e22ea336a3e14c155053b1507ff40f28c Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 14 Aug 2024 14:32:36 -0500 Subject: [PATCH 1/2] fix: define swap vars in datadog state --- salt/datadog/init.sls | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/salt/datadog/init.sls b/salt/datadog/init.sls index 82ccc567..289dbd63 100644 --- a/salt/datadog/init.sls +++ b/salt/datadog/init.sls @@ -1,3 +1,7 @@ +{% set swap_file = salt["pillar.get"]("swap_file", {}) %} +{% set swap_size = swap_file.get("swap_size", "1024") %} +{% set swap_path = swap_file.get("swap_path") %} + {% if grains["oscodename"] == ["jammy", "noble"] %} datadogkey: file.managed: From 91d2f8d85ec91fae5a35bcfa44e15bcdbb7e2468 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Wed, 14 Aug 2024 14:39:17 -0500 Subject: [PATCH 2/2] Update salt/datadog/init.sls Co-authored-by: Ee Durbin --- salt/datadog/init.sls | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/salt/datadog/init.sls b/salt/datadog/init.sls index 289dbd63..3acb43b6 100644 --- a/salt/datadog/init.sls +++ b/salt/datadog/init.sls @@ -1,6 +1,4 @@ -{% set swap_file = salt["pillar.get"]("swap_file", {}) %} -{% set swap_size = swap_file.get("swap_size", "1024") %} -{% set swap_path = swap_file.get("swap_path") %} +{% set swap_path = salt['pillar.get'](salt['pillar.get']('swap_file:swap_path')) %} {% if grains["oscodename"] == ["jammy", "noble"] %} datadogkey: