Skip to content

Commit

Permalink
fix: client install the ssh-agent client packages
Browse files Browse the repository at this point in the history
The client should install the agent client packages and not the
opposite. The way it was, it would not be possible to include the agent
client packages to the ssh client, as it would create a recursive loop.
  • Loading branch information
ben-grande committed Jan 21, 2024
1 parent c0b6c4c commit f536258
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions salt/ssh/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{% if grains['nodename'] != 'dom0' -%}

include:
- sys-ssh-agent.install-client
- dotfiles.copy-x11
- dotfiles.copy-ssh

Expand Down
7 changes: 4 additions & 3 deletions salt/sys-ssh-agent/install-client.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{% if grains['nodename'] != 'dom0' -%}

include:
- ssh.install
- dev.home-cleanup
- dotfiles.copy-sh
- dotfiles.copy-ssh
Expand All @@ -23,14 +22,16 @@ include:
- install_recommends: False
- skip_suggestions: True
- pkgs:
- qubes-core-agent-networking
- ca-certificates
- socat

{% set pkg = {
'Debian': {
'pkg': ['procps'],
'pkg': ['procps', 'openssh-client'],
},
'RedHat': {
'pkg': ['procps-ng'],
'pkg': ['procps-ng', 'openssh-clients'],
},
}.get(grains.os_family) -%}

Expand Down
19 changes: 18 additions & 1 deletion salt/sys-ssh-agent/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later
{% if grains['nodename'] != 'dom0' -%}

include:
- ssh.install
- dev.home-cleanup
- dotfiles.copy-sh
- dotfiles.copy-ssh
Expand All @@ -23,8 +22,26 @@ include:
- install_recommends: False
- skip_suggestions: True
- pkgs:
- qubes-core-agent-networking
- ca-certificates
- socat

{% set pkg = {
'Debian': {
'pkg': ['openssh-client'],
},
'RedHat': {
'pkg': ['openssh-clients'],
},
}.get(grains.os_family) -%}

"{{ slsdotpath }}-installed-os-specific":
pkg.installed:
- refresh: True
- install_recommends: False
- skip_suggestions: True
- pkgs: {{ pkg.pkg|sequence|yaml }}

"{{ slsdotpath }}-agent-bin-dir":
file.recurse:
- source: salt://{{ slsdotpath }}/files/server/bin
Expand Down

0 comments on commit f536258

Please sign in to comment.