From aa8f9dbfd6e534e53557b4ae917a90951f8714ac Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 22 Dec 2021 11:12:46 +0000 Subject: [PATCH] test(default): use `grains.get` for `oscodename` (for FreeBSD) [skip ci] Otherwise encounter this failure in the CI on FreeBSD: ``` salt.exceptions.SaltRenderError: Jinja variable 'dict object' has no attribute 'oscodename' [CRITICAL] Pillar render error: Rendering SLS 'openssh' failed. Please see master log for details. ``` --- test/salt/pillar/default.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/salt/pillar/default.sls b/test/salt/pillar/default.sls index 4107490..ac9f88e 100644 --- a/test/salt/pillar/default.sls +++ b/test/salt/pillar/default.sls @@ -27,7 +27,7 @@ sshd_config: {%- endif %} {#- Need this on various platforms to avoid the `kitchen verify` failure as mentioned above; see: #} {#- * https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/-/commit/cb6781a2bba9 #} - {%- if grains.os in ["Arch", "OpenBSD"] or grains.oscodename in ["openSUSE Tumbleweed"] %} + {%- if grains.os in ["Arch", "OpenBSD"] or grains.get("oscodename", "") in ["openSUSE Tumbleweed"] %} PubkeyAcceptedAlgorithms: "+ssh-rsa" {%- endif %}