0

I'm currently building reusable Playbooks which is fine for InSpec testing post deployment as I know exactly how it will always look.

I'm moving onto configuration items that change build on build with the use of variables in ansible. Is there way in which I can build InSpec tests that will ensure the variable entered has been correctly used without hard coding the variable into InSpec before running the test?

Thanks

Spike
  • 130
  • 2
  • 12

1 Answers1

0

It looks like you could make use of --attr switch. You can pass a file through a command like this:

inspec exec . --attrs attributes/client-attributes.yml

Take a look at this article.

Dan
  • 11,077
  • 20
  • 84
  • 119