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

Misnamed require target in trusted_ca::java exec resource #74

Open
ashleygould opened this issue Jan 15, 2025 · 0 comments · May be fixed by #75
Open

Misnamed require target in trusted_ca::java exec resource #74

ashleygould opened this issue Jan 15, 2025 · 0 comments · May be fixed by #75

Comments

@ashleygould
Copy link

In trusted_ca::java the require attribute in exec resource is set File["/tmp/${name}-trustedca"]. It should be set to File[$filename] instead. This causes and error when I set a non-default value to trusted_ca::java::filename parameter.

This is clearly a syntax mistake since the required file resource is spelled file { $filename:.

Affected Puppet, Ruby, OS and module versions/distributions

We run a masterless puppet environment. I.e. nodes run puppet apply from crontab.

  • Puppet:
~> puppet --version
7.19.0
~> rpm -q puppet-agent
puppet-agent-7.19.0-1.fc34.x86_64
  • Ruby:
~> /opt/puppetlabs/puppet/bin/ruby --version
ruby 2.7.6p219 (2022-04-12 revision c9c2245c0a) [x86_64-linux]
  • Distribution:
~> cat /etc/system-release
Amazon Linux release 2023.6.20241212 (Amazon Linux)
  • Module version: 5.1.0

How to reproduce (e.g Puppet code you use)

My usage:

        # Install self-signed CA cert into default java trust store.
        trusted_ca::java { "Our-Self-Signed-CA":
            source        => $ca_cert,
            java_keystore => $default_java_keystore,
            filename      => "${work_dir}/temp_ca_cert",
        }

What are you seeing

Compilation error

What behaviour did you expect instead

I expect that if I specify a value for $filename, the exec resource will compile properly

Output log

Resulting error:

Running puppet apply on host xxxxxxxx.  Wed Jan 15 11:49:26 AM PST 2025

Running all modules in manifest file /home/agould/my_puppet_workspace/environments/modules/manifests/test_all.pp
Info: Loading facts
Error: Could not find resource 'File[/tmp/Our-Self-Signed-CA-trustedca]' in parameter 'require' (file: /home/agould/my_puppet_workspace/environments/uc3-modules/modules/trusted_ca/manifests/java.pp, line: 64) on node xxxxxxxx

Any additional information you'd like to impart

@ekohl ekohl linked a pull request Jan 15, 2025 that will close this issue
@ashleygould ashleygould linked a pull request Jan 15, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant