From 3690eeec50199954522e76c33fc7d49fc620fabf Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Wed, 14 Jul 2021 09:08:02 +0100 Subject: [PATCH] refactor(kitchen): use YAML node anchors to minimise duplication --- kitchen.yml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/kitchen.yml b/kitchen.yml index f38ac39..c707c3f 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -56,19 +56,15 @@ platforms: run_command: /lib/systemd/systemd - name: fedora-33 driver: - provision_command: + provision_command: &fedora_provision_command - dnf -y install procps-ng - sed -i 's/^PubkeyAcceptedKeyTypes.*$/&,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config - name: fedora-34 driver: - provision_command: - - dnf -y install procps-ng - - sed -i 's/^PubkeyAcceptedKeyTypes.*$/&,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config + provision_command: *fedora_provision_command - name: fedora-35 driver: - provision_command: - - dnf -y install procps-ng - - sed -i 's/^PubkeyAcceptedKeyTypes.*$/&,ssh-rsa/' /etc/crypto-policies/back-ends/opensshserver.config + provision_command: *fedora_provision_command - name: gentoo driver: image: gentoo/stage3:latest @@ -84,17 +80,14 @@ platforms: - name: opensuse-15 driver: image: opensuse/leap:15.3 - provision_command: + provision_command: &opensuse_provision_command - zypper --non-interactive install --auto-agree-with-licenses dbus-1 - zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl systemd - systemctl enable sshd.service - name: opensuse-tumbleweed driver: image: opensuse/tumbleweed:latest - provision_command: - - zypper --non-interactive install --auto-agree-with-licenses dbus-1 - - zypper --non-interactive install --auto-agree-with-licenses sudo openssh which curl systemd - - systemctl enable sshd.service + provision_command: *opensuse_provision_command - name: oraclelinux-8 - name: oraclelinux-7 - name: rockylinux-8