-
-
Notifications
You must be signed in to change notification settings - Fork 34
Add hash expansion of existing types #120
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
base: master
Are you sure you want to change the base?
Conversation
Once the main class has been included:
```puppet
include augeasproviders_ssh
````
type instances can be loaded from hiera data, for example:
```yaml
augeasproviders_ssh::sshd_configs:
AllowAgentForwarding:
ensure: 'present'
value: 'yes',
PermitRootLogin:
ensure: 'present'
value: 'yes'
```
|
Well the easy fix to the CI is #115 |
|
Tests fixed but only by adding an unused hiera.yaml file ? |
spec/spec_helper.rb
Outdated
|
|
||
| RSpec.configure do |c| | ||
| c.facterdb_string_keys = false | ||
| c.hiera_config = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes me wonder if rspec-puppet itself should deal better with this. Relevant code: https://github.com/OpenVoxProject/openvox/blob/f70dd2111bed0be3ede7017c062df0edceb4ccd0/lib/puppet/indirector/hiera.rb#L80-L92
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the problem at all running locally with rspec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty string resulted in:
[#<Puppet::Util::Log:0x00007f117c545ff8 @level=:err, @tags=#<Puppet::Util::TagSet: {"err"}>, @message="Evaluation Error: Error while evaluating a Function Call, Is a directory @ io_fread - /home/runner/work/puppet-augeasproviders_ssh/puppet-augeasproviders_ssh", @source="Puppet", @time=2025-09-01 14:46:11.80255521 +0000, @line=2, @pos=1, @issue_code=:RUNTIME_ERROR, @node="pkrvmccyg1gnepe.h0l24wjbi32ehma3ntfoutcuxb.cx.internal.cloudapp.net">,
so that's a no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "workaround" is now just a setting a for a hiera file that does not exist at all. Have added the .sync.yml to keep it there.
This is fairly resolved for me.
Without this v5 hiera yaml file: ``` + #<Puppet::Util::Log:0x00007f1ed6e6f298 @Level=:warning, @tags=#<Puppet::Util::TagSet: {"warning"}>, @message="/dev/null: File exists but does not contain a valid YAML hash. Falling back to Hiera version 3 default config", @source="Puppet", @time=2025-09-01 12:40:08.763493772 +0000>, + #<Puppet::Util::Log:0x00007f1ed6e6f1a8 @Level=:warning, @tags=#<Puppet::Util::TagSet: {"warning"}>, @message="/dev/null: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5\n (file: /dev/null)", @source="Puppet", @time=2025-09-01 12:40:08.763558543 +0000>, ```
This Pull Request (PR) fixes the following issues
Once the main class has been included:
include augeasproviders_sshtype instances can be loaded from hiera data, for example: