Johnathan Herndon
Johnathan Herndon

Reputation: 91

How do I query nodegroups and file_roots on salt-master?

I have a few nodegroups set in a separate master.d/*.conf file and can correctly target them. I was wondering if there is a mechanism on the salt master to list nodegroups and their members without having to look through the master file or master.d/*.conf files. Is there a way to list file_roots too without having to look through files?

Upvotes: 3

Views: 881

Answers (1)

sel-fish
sel-fish

Reputation: 4476

i'm not sure that there is some way to get nodegroup file contents, but there are some methods to look into file_roots content:

salt-run fileserver.file_list

should run on the master. There are some similar commands, i'm not sure which one you exactly need.

salt-run fileserver.dir_list

salt-run fileserver.envs

you can see more about salt-run through the document

Upvotes: 1

Related Questions