Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Lookup ListenAddress from Pillar key #214

Open
BigBadBassMan opened this issue May 6, 2024 · 0 comments
Open

[FEATURE] Lookup ListenAddress from Pillar key #214

BigBadBassMan opened this issue May 6, 2024 · 0 comments

Comments

@BigBadBassMan
Copy link

Is your feature request related to a problem?

Pinning sshd-server to a specific IP is only possible by directly configuring it via sshd_config:ListenAddress, which is cumbersome and requires one to supply duplicate data to all minions (duplicate in a sense, that the IP may be available elsewhere in the pillar data).

Describe the solution you'd like

Being able to designate a source pillar key to use, maybe something like:

openssh:
  lookup:
    sshd_pillar_listen_address: 'some:pillar:key:that:holds:the:ip'

which would then be converted in map.jinja to the actual value:

mapdata:
  values:
    sshd_config:
      ListenAddress: 1.2.3.4

Describe alternatives you've considered

Supplementing the matcher sources (i.e. 'I:SUB@pillar:key:to:lookup', but that is not really documented well, and I could not find out, if lookup and inserting under a different dict-key is possible at all.

Additional context

Binding sshd to a specific IP may be desirable in more complex networks, where hosts have more than one network interface, but should expose OpenSSH only on one specific card.

Setting the listen address dynamically is not a problem, when using pillar files, as we can write some jinja-logic into the correct pillar.
That approach is not feasible with dynamically provided pillar data (i.e. like Tower/Foreman/Puppet/...) where only yaml is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant