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

Sshd.lns fails to parse Match block #56

Open
vchepkov opened this issue May 7, 2020 · 3 comments
Open

Sshd.lns fails to parse Match block #56

vchepkov opened this issue May 7, 2020 · 3 comments

Comments

@vchepkov
Copy link

vchepkov commented May 7, 2020

While trying to apply the following code

  sshd_config { 'PermitRootLogin':
    value  => 'no',
  }

receive the following error message

Error: /Stage[main]/Ssh/Sshd_config[PermitRootLogin]: Could not evaluate: Augeas didn't load /etc/ssh/sshd_config with Sshd.lns from /opt/puppetlabs/puppet/cache/lib/augeas/lenses: Get did not match entire input (line:148, character:0)

The line 148 starts match block added by GitLab installer:

Match User git    # Apply the AuthorizedKeysCommands to the git user only
  AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check git %u %k
  AuthorizedKeysCommandUser git
Match all    # End match, settings apply to all users again
@vchepkov
Copy link
Author

vchepkov commented May 7, 2020

@raphink , could you suggest a workaround, please?

@derekmpage
Copy link

Can anyone suggest a work around for this?

@emperortomato
Copy link

This is still an issue -- the lens seems to be tripped up by the Match all line, rather than the indentation or comments. Removing that line allows it to work, but that's not necessarily desirable, unless the Match User git block appears at the very end of the file (although it probably does).

This lens also seems incapable of creating a Match all line using the sshd_config_match resource, which gives an error:

Error: /Stage[main]/Profiles::Sshd/Sshd_config_match[all]: Could not evaluate: undefined method `keys' for nil:NilClass

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

3 participants