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

single fact query not returning value #129

Closed
asagarshinde opened this issue Oct 21, 2017 · 2 comments · Fixed by #206
Closed

single fact query not returning value #129

asagarshinde opened this issue Oct 21, 2017 · 2 comments · Fixed by #206
Labels

Comments

@asagarshinde
Copy link

asagarshinde commented Oct 21, 2017

While trying to retrieve particular fact from node it returns the name and node rather than the value and node.

node.fact('ipaddress')
Fact: ipaddress/puppet.server.com
node.fact('operatingsystem')
Fact: operatingsystem/puppet.server.com

@asagarshinde asagarshinde changed the title single facts query not returning value single fact query not returning value Oct 21, 2017
@cabrinha
Copy link

cabrinha commented Nov 5, 2018

Seeing this here too. How are we supposed to get the values from these facts?

@6uhrmittag
Copy link

6uhrmittag commented Dec 12, 2019

I just found it via trial and error..

You get values like this(here it's the fact hostname):

    print("nodes:")
    for node in nodes:
        print(node.fact('hostname').value)

@gdubicki gdubicki added the docs label Mar 21, 2021
gdubicki pushed a commit to gdubicki/pypuppetdb that referenced this issue Mar 21, 2021
gdubicki added a commit to gdubicki/pypuppetdb that referenced this issue Apr 11, 2021
and generally revamp the docs. Some fixes:
* add info on how to use the ssl_verify to provide
  the CA root certificate (fixes voxpupuli#143),
* improve some examples, fixing voxpupuli#129,
gdubicki added a commit to gdubicki/pypuppetdb that referenced this issue Apr 11, 2021
and generally revamp the docs. Some fixes:
* add info on how to use the ssl_verify to provide
  the CA root certificate (fixes voxpupuli#143),
* improve some examples, fixing voxpupuli#129,
gdubicki added a commit to gdubicki/pypuppetdb that referenced this issue Apr 15, 2021
and generally revamp the docs. Some fixes:
* add info on how to use the ssl_verify to provide
  the CA root certificate (fixes voxpupuli#143),
* improve some examples, fixing voxpupuli#129,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants