File tree Expand file tree Collapse file tree 4 files changed +87
-1
lines changed Expand file tree Collapse file tree 4 files changed +87
-1
lines changed Original file line number Diff line number Diff line change @@ -350,4 +350,4 @@ suites:
350350 packages.sls : test/salt/pillar/windows.sls
351351 verifier :
352352 inspec_tests :
353- - path : test/integration/default
353+ - path : test/integration/windows
Original file line number Diff line number Diff line change 1+ # InSpec Profile: ` windows `
2+
3+ This shows the implementation of the ` windows ` InSpec [ profile] ( https://github.com/inspec/inspec/blob/master/docs/profiles.md ) .
4+
5+ ## Verify a profile
6+
7+ InSpec ships with built-in features to verify a profile structure.
8+
9+ ``` bash
10+ $ inspec check windows
11+ Summary
12+ -------
13+ Location: windows
14+ Profile: profile
15+ Controls: 4
16+ Timestamp: 2019-06-24T23:09:01+00:00
17+ Valid: true
18+
19+ Errors
20+ ------
21+
22+ Warnings
23+ --------
24+ ```
25+
26+ ## Execute a profile
27+
28+ To run all ** supported** controls on a local machine use ` inspec exec /path/to/profile ` .
29+
30+ ``` bash
31+ $ inspec exec windows
32+ ..
33+
34+ Finished in 0.0025 seconds (files took 0.12449 seconds to load)
35+ 8 examples, 0 failures
36+ ```
37+
38+ ## Execute a specific control from a profile
39+
40+ To run one control from the profile use ` inspec exec /path/to/profile --controls name ` .
41+
42+ ``` bash
43+ $ inspec exec windows --controls package
44+ .
45+
46+ Finished in 0.0025 seconds (files took 0.12449 seconds to load)
47+ 1 examples, 0 failures
48+ ```
49+
50+ See an [ example control here] ( https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb ) .
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ pkgs_wanted = %w[ adobereader Firefox jq notepadplusplus ]
4+ pkgs_unwanted = %w[ GoogleChrome hg ]
5+
6+ ### WANTED
7+ control 'Wanted packages' do
8+ title 'should be installed'
9+
10+ pkgs_wanted . each do |p |
11+ describe chocolatey_package ( p ) do
12+ it { should be_installed }
13+ end
14+ end
15+ end
16+
17+ ### UNWANTED
18+ control 'Unwanted packages' do
19+ title 'should be uninstalled'
20+
21+ pkgs_unwanted . each do |p |
22+ describe chocolatey_package ( p ) do
23+ it { should_not be_installed }
24+ end
25+ end
26+ end
Original file line number Diff line number Diff line change 1+ # -*- coding: utf-8 -*-
2+ # vim: ft=yaml
3+ ---
4+ name : default
5+ title : packages formula
6+ maintainer : SaltStack Formulas
7+ license : Apache-2.0
8+ summary : Verify that the packages formula is setup and configured correctly
9+ supports :
10+ - platform : windows
You can’t perform that action at this time.
0 commit comments