From ecd62e45075c19bce13d42d88c9372c1a308699f Mon Sep 17 00:00:00 2001
From: Imran Iqbal <iqbalmy@hotmail.com>
Date: Fri, 22 Oct 2021 11:25:41 +0100
Subject: [PATCH] test(pillar): add `ssh-rsa` Kitchen workaround on Arch Linux
 [skip ci]

Need this on Arch Linux to avoid the `kitchen verify` failure; see:

* https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/-/commit/cb6781a2bba9
---
 .../integration/default/files/_mapdata/arch-base-latest.yaml | 1 +
 test/salt/pillar/default.sls                                 | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml
index a3fffb5..3c6705e 100644
--- a/test/integration/default/files/_mapdata/arch-base-latest.yaml
+++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml
@@ -180,6 +180,7 @@ values:
     AcceptEnv: LANG LC_*
     ChallengeResponseAuthentication: 'no'
     PrintMotd: 'no'
+    PubkeyAcceptedAlgorithms: "+ssh-rsa"
     Subsystem: sftp /usr/lib/openssh/sftp-server
     UsePAM: 'yes'
     X11Forwarding: 'yes'
diff --git a/test/salt/pillar/default.sls b/test/salt/pillar/default.sls
index 3551607..4e8d4c5 100644
--- a/test/salt/pillar/default.sls
+++ b/test/salt/pillar/default.sls
@@ -25,6 +25,11 @@ sshd_config:
   {%- if grains.os != "OpenBSD" %}
   UsePAM: 'yes'
   {%- endif %}
+  {#- Need this on Arch Linux to avoid the `kitchen verify` failure as mentioned above; see: #}
+  {#- * https://gitlab.com/saltstack-formulas/infrastructure/salt-image-builder/-/commit/cb6781a2bba9 #}
+  {%- if grains.os == "Arch" %}
+  PubkeyAcceptedAlgorithms: "+ssh-rsa"
+  {%- endif %}
 
 ssh_config:
   Hosts:
-- 
GitLab