-
Notifications
You must be signed in to change notification settings - Fork 683
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
inspec exec with --json-config option having multiple node information #1897
Comments
@shoneslab thanks for your issue! I believe we chatted about the same thing in Slack yesterday. As we discussed, InSpec is designed to only scan one host. There are other solutions for scanning multiple hosts, such as Chef's own commercial offerings, but there are currently no plans to allow for scanning of multiple hosts via a single InSpec command. I am going to flag this as a bug though. We should provide better error output if someone tries to feed us an array of hosts. Thank you for submitting this issue so we can make the user experience better. |
Thanks. Regarding the commercial offering, are you referring to Habitat? |
Hi @shoneslab. Nope, Habitat is also an open-source project like InSpec. I was referring to Chef Automate which provides the ability to receive compliance reports from your fleet (via audit cookbook, for example) and give you a fleet-wide view of your compliance status. That way your hosts can be running InSpec periodically throughout the day vs. you needing to scan them. |
cool. Thanks. To try Chef automate, is it limited to nodes or for a duration or do we get any trial licence. |
@shoneslab it's limited to a specific duration, I believe 30 days. If you find it doesn't meet your needs, or you want other options, be sure to look at the link to the audit cookbook I mentioned earlier. There are other ways, such as the json exporter, that you can use to have your nodes write out their InSpec findings to a JSON file and then you can scoop them up using a manner you're comfortable with, as well. |
Thanks for the detail info. This was really helpful. |
Description
Try to execute inspec exec or inspec detect with --json-config option with array of nodes. It works with single node information. Getting error like undefined method 'merge' for...
How to create a json with mutiple node informations. Or how to execute inspec against multiple nodes
InSpec and Platform Version
Using the inspec's docker image
docker run -it -rm -n ${pwd}:/share chef/inspec detect --json-config=nodes.json
Replication Case
docker run -it -rm -n ${pwd}:/share chef/inspec detect --json-config=nodes.json
nodes.json
Error:
The text was updated successfully, but these errors were encountered: