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

Specifying --node on puppet lookup always fails with No facts available for target node #9544

Open
J-Verz opened this issue Feb 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@J-Verz
Copy link

J-Verz commented Feb 5, 2025

Describe the Bug

When trying to lookup Hiera data using puppet lookup foo --node node.example.com, I always get No facts available for target node: node.example.com. This even happens if I enter the hostname of the node I am on. If I leave off the --node option I get results for the current node like expected.

Expected Behavior

I should be able to lookup node-specific Hiera data by specifying the node with --node

Steps to Reproduce

  1. Create a hiera.yaml like so
version: 5

defaults:
  datadir: hieradata
  data_hash: yaml_data

hierarchy:
  - name: Per-node data
    path: "nodes/%{trusted.certname}.yaml"

  - name: Common data
    path: common.yaml
  1. Create a hieradata/common.yaml like so:
foo: common
  1. Create a node-specific file hieradata/nodes/node.example.com.yaml like so:
foo: node
  1. Run puppet lookup foo --node node.example.com
  2. Get Error: Could not run: No facts available for target node: node.example.com as result

Environment

  • Puppet Version: 7.23.0
  • Puppetserver Version: 7.9.5
  • Platform: Debian 12
@J-Verz J-Verz added the bug Something isn't working label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant