From 9ceff82a0c3e235d395b12ea38912ffddc0e14fb Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Mon, 9 Dec 2024 13:18:20 -0700 Subject: [PATCH] Add sudo and ssh to containers --- .../golden-state-tree/os/amazon/pkgs/init.sls | 2 ++ .../golden-state-tree/os/amazon2023/pkgs/init.sls | 2 ++ .../golden-state-tree/os/debian/pkgs/init.sls | 2 ++ .../golden-state-tree/os/fedora/pkgs/init.sls | 2 ++ .../golden-state-tree/os/photon/pkgs/init.sls | 2 ++ .../golden-state-tree/os/rocky/pkgs/init.sls | 2 ++ .../golden-state-tree/os/ubuntu/pkgs/init.sls | 2 ++ custom/testing/golden-state-tree/pkgs/ssh.sls | 15 +++++++++++++++ 8 files changed, 29 insertions(+) create mode 100644 custom/testing/golden-state-tree/pkgs/ssh.sls diff --git a/custom/testing/golden-state-tree/os/amazon/pkgs/init.sls b/custom/testing/golden-state-tree/os/amazon/pkgs/init.sls index 92c9abe..7e12bbb 100644 --- a/custom/testing/golden-state-tree/os/amazon/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/amazon/pkgs/init.sls @@ -23,6 +23,8 @@ include: - pkgs.rpmdevtools - pkgs.rsync - pkgs.sed + - pkgs.sudo + - pkgs.ssh - pkgs.swig - pkgs.tar - pkgs.zlib diff --git a/custom/testing/golden-state-tree/os/amazon2023/pkgs/init.sls b/custom/testing/golden-state-tree/os/amazon2023/pkgs/init.sls index e873c46..fc1d98f 100644 --- a/custom/testing/golden-state-tree/os/amazon2023/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/amazon2023/pkgs/init.sls @@ -24,6 +24,8 @@ include: - pkgs.rsync - pkgs.sed - pkgs.swig + - pkgs.ssh + - pkgs.sudo - pkgs.tar - pkgs.zlib - pkgs.vault diff --git a/custom/testing/golden-state-tree/os/debian/pkgs/init.sls b/custom/testing/golden-state-tree/os/debian/pkgs/init.sls index 2c0d67c..a97bc91 100644 --- a/custom/testing/golden-state-tree/os/debian/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/debian/pkgs/init.sls @@ -25,6 +25,8 @@ include: - pkgs.rng-tools - pkgs.rsync - pkgs.sed + - pkgs.ssh + - pkgs.sudo - pkgs.swig - pkgs.tar - pkgs.zlib diff --git a/custom/testing/golden-state-tree/os/fedora/pkgs/init.sls b/custom/testing/golden-state-tree/os/fedora/pkgs/init.sls index bd43a5a..dd63776 100644 --- a/custom/testing/golden-state-tree/os/fedora/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/fedora/pkgs/init.sls @@ -25,6 +25,8 @@ include: - pkgs.rng-tools - pkgs.rpmdevtools - pkgs.rsync + - pkgs.sudo + - pkgs.ssh - pkgs.sed - pkgs.swig - pkgs.tar diff --git a/custom/testing/golden-state-tree/os/photon/pkgs/init.sls b/custom/testing/golden-state-tree/os/photon/pkgs/init.sls index 3fa3460..e2ef74e 100644 --- a/custom/testing/golden-state-tree/os/photon/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/photon/pkgs/init.sls @@ -31,6 +31,8 @@ include: {%- endif %} - pkgs.rsync - pkgs.sed + - pkgs.sudo + - pkgs.ssh - pkgs.swig - pkgs.tar - pkgs.zlib diff --git a/custom/testing/golden-state-tree/os/rocky/pkgs/init.sls b/custom/testing/golden-state-tree/os/rocky/pkgs/init.sls index 47ec55c..03c0112 100644 --- a/custom/testing/golden-state-tree/os/rocky/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/rocky/pkgs/init.sls @@ -27,6 +27,8 @@ include: - pkgs.rpmdevtools - pkgs.rsync - pkgs.sed + - pkgs.ssh + - pkgs.sudo - pkgs.swig - pkgs.tar - pkgs.tree diff --git a/custom/testing/golden-state-tree/os/ubuntu/pkgs/init.sls b/custom/testing/golden-state-tree/os/ubuntu/pkgs/init.sls index b980f99..178da65 100644 --- a/custom/testing/golden-state-tree/os/ubuntu/pkgs/init.sls +++ b/custom/testing/golden-state-tree/os/ubuntu/pkgs/init.sls @@ -31,6 +31,8 @@ include: - pkgs.python3-venv - pkgs.rng-tools - pkgs.rsync + - pkgs.ssh + - pkgs.sudo - pkgs.sed - pkgs.systemd - pkgs.swig diff --git a/custom/testing/golden-state-tree/pkgs/ssh.sls b/custom/testing/golden-state-tree/pkgs/ssh.sls new file mode 100644 index 0000000..58496d5 --- /dev/null +++ b/custom/testing/golden-state-tree/pkgs/ssh.sls @@ -0,0 +1,15 @@ +{%- if grains['os_family'] in ('RedHat', 'Suse') %} + {%- set client_pkg = "openssh" -%} + {%- set server_pkg = "openssh-server" -%} +{%- else %} + {%- set client_pkg = "openssh-client" -%} + {%- set server_pkg = "openssh-server" -%} +{%- endif %} + +ssh-client: + pkg.installed: + - name: {{ client_pkg }} + +ssh-server: + pkg.installed: + - name: {{ server_pkg }}