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

Module fails to run with strict_variables set to true on Darwin for version 9.0.0 #334

Closed
geoffdavis opened this issue Jul 3, 2022 · 5 comments

Comments

@geoffdavis
Copy link

geoffdavis commented Jul 3, 2022

I get the following error when I run with strict_variables:

Evaluation Error: Unknown variable: 'ssh::params::sshd_binary'. (file: /builds/anf-systems/puppet/puppet-environments/spec/fixtures/modules/ssh/manifests/init.pp, line: 165, column: 64)

This is presumably because manifests/params.pp does not have a variable definition for sshd_binary in the Darwin clause, nor for sshd_environments_file. See

'Darwin': {

Presumably this issue is gone in the master branch (I see that params.pp has disappeared), but the most recent forge module, 9.0.0, has this issue.

@geoffdavis
Copy link
Author

geoffdavis commented Jul 3, 2022

Note that this can be worked around by setting several variables in your hieradata to define the missing parameters.

---
# Darwin.yaml

# Work around bug in ssh 9.0.0 module
# See https://github.com/saz/puppet-ssh/issues/334
ssh::sshd_binary: /usr/sbin/sshd
ssh::sshd_environments_file: /dev/null

@saz
Copy link
Owner

saz commented Aug 7, 2022

@geoffdavis What's the reason for ssh::sshd_environments_file: /dev/null? It defaults to undef and wouldn't be added to the config file.

@geoffdavis
Copy link
Author

I think ssh_environments_file had a conditional clause somewhere in the puppet code that broke if it wasn't set to something. It's been a while so I'll have to dig through the code again to find where. It wasn't the template. The /dev/null value was chosen because it was harmless.

@saz
Copy link
Owner

saz commented Aug 8, 2022

Thanks for the feedback, I'll set up a test installation and see what's needed to fix this completely

@saz
Copy link
Owner

saz commented Oct 31, 2022

This should be fixed in v10.0.0

@saz saz closed this as completed Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants