Hi all, Thank you for submitting feedback on puppet facts show. Based on this we've implemented the following changes:
--value-only command option to replicate the facter behaviour when a single query is provided: When there is a single query, only display the value of the fact without its name: ~~ puppet facts facterversion --value-only "4.0.47" Also this generates a warning message if the argument is used with multiple queries or with no query at all, and ignores the argument: puppet facts show facterversion os --value-only Warning: Incorrect use of --value-only argument! The argument must be used when querying for a single fact! flat render format for the users to be able to use cut and grep on the output: When there is a query for a simple fact: puppet facts show facterversion --render-as flat facterversion=4.0.47 and with --value-only puppet facts show facterversion --render-as flat --value-only 4.0.47 When there is a query for a more complex fact (ex. os) the output will be: ~~ puppet facts os --render-as flat os.architecture=x86_64 os.family=Darwin os.hardware=x86_64 os.macosx.build=18G95 os.macosx.product=Mac OS X os.macosx.version.full=10.14.6 os.macosx.version.major=10.14 os.macosx.version.minor=6os.name=Darwin os.release.full=18.7.0 os.release.major=18 os.release.minor=7 and with --value-only ~~ puppet facts os --render-as flat --value-only architecture=x86_64 family=Darwin hardware=x86_64 macosx.build=18G95 macosx.product=Mac OS X macosx.version.full=10.14.6 macosx.version.major=10.14 macosx.version.minor=6 name=Darwin release.full=18.7.0 release.major=18 release.minor=7 For multiple user queries the output is : ~~ puppet facts show os.name facterversion --render-as flat facterversion=4.0.47os.name=Darwin When the result is an array, the index of each element is also displayed: ~~ puppet facts show processors.models --render-as flat processors.models.0=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.1=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.2=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.3=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.4=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.5=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.6=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz processors.models.7=Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz ~~ puppet facts show networking.interfaces.interface_name.bindings6 --render-as flat --value-only 0.address=fe80::... 0.netmask=ffff:ffff:ffff:ffff:: 0.network=fe80:: 0.scope6=link As always, we appreciate your continuous support and feedback. Cheers, Oana Tanasoiu -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CAAg2hmNG8OewruefSy_K%2B4ugsEhOL-pik0XyAK0eUE4wG9woxg%40mail.gmail.com.
