mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
add exmaple inheritance profile
This commit is contained in:
parent
f6c5d4de12
commit
81c7a6f22e
3 changed files with 40 additions and 0 deletions
19
examples/inheritance/README.md
Normal file
19
examples/inheritance/README.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Example InSpec Profile
|
||||
|
||||
This example shows the use of InSpec [profile](../../docs/profiles.rst) inheritance.
|
||||
|
||||
## Verify a profile
|
||||
|
||||
InSpec ships with built-in features to verify a profile structure.
|
||||
|
||||
```bash
|
||||
$ inspec check examples/inheritance --profiles-path examples
|
||||
```
|
||||
|
||||
## Execute a profile
|
||||
|
||||
To run a profile on a local machine use `inspec exec /path/to/profile`.
|
||||
|
||||
```bash
|
||||
$ inspec exec examples/inheritance --profiles-path examples
|
||||
```
|
11
examples/inheritance/controls/example.rb
Normal file
11
examples/inheritance/controls/example.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# encoding: utf-8
|
||||
# copyright: 2015, Chef Software, Inc.
|
||||
# license: All rights reserved
|
||||
|
||||
include_controls 'profile' do
|
||||
skip_control 'tmp-1.0'
|
||||
|
||||
control 'gordon-1.0' do
|
||||
impact 0.0
|
||||
end
|
||||
end
|
10
examples/inheritance/inspec.yml
Normal file
10
examples/inheritance/inspec.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
name: inheritance
|
||||
title: InSpec example inheritance
|
||||
maintainer: Chef Software, Inc.
|
||||
copyright: Chef Software, Inc.
|
||||
copyright_email: support@chef.io
|
||||
license: Apache 2 license
|
||||
summary: Demonstrates the use of InSpec profile inheritance
|
||||
version: 1.0.0
|
||||
supports:
|
||||
- os-family: linux
|
Loading…
Reference in a new issue