Merge pull request #48286 from terminalmage/caller-print_grains

Don't load the grains again when printing them via salt-call -g
This commit is contained in:
Nicole Thomas 2018-06-25 09:19:17 -04:00 committed by GitHub
commit 1f306525a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ class BaseCaller(object):
'''
Print out the grains
'''
grains = salt.loader.grains(self.opts)
grains = self.minion.opts.get('grains') or salt.loader.grains(self.opts)
salt.output.display_output({'local': grains}, 'grains', self.opts)
def run(self):