Update facts without applying catalog.

45 views
Skip to first unread message

Sergii Alieksanov

unread,
Jul 9, 2015, 6:37:42 PM7/9/15
to puppet...@googlegroups.com
Hello!

Is it possible to force puppet agent to send facts to master (puppetdb) while it is locked (puppet agent --disable) or run in --noop mode?
The reason to have such feature is pretty simple: having up-to-date node specs with puppet agent in locked state. 
Thanks!

Cheers,
Sergii

asq

unread,
Jul 13, 2015, 6:10:48 AM7/13/15
to puppet...@googlegroups.com
you can disable it with prerun_command - then it will fail late (after retrieving catalog from master). ie.

[training ~]# FACTER_fooism=true puppet agent -t --prerun_command=/bin/false
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for training
Error: Could not run command from prerun_command: Execution of '/bin/false' returned 1:
[training ~]# grep fooism /var/opt/lib/pe-puppet/yaml/facts/training.yaml
    fooism: "true"

if you write your own prerun_command script you can also include a message (just write to stdout) which will be included into puppet report.

Reply all
Reply to author
Forward
0 new messages