mirror of
https://github.com/inspec/inspec
synced 2025-02-16 22:18:38 +00:00
add readme to examples
This commit is contained in:
parent
9ce50b8c53
commit
37b8e4c3e4
4 changed files with 114 additions and 1 deletions
7
examples/README.md
Normal file
7
examples/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# InSpec examples
|
||||
|
||||
This directory contains multiple examples that explain the usage of the InSpec:
|
||||
|
||||
- `kitchen-chef` Test-Kitchen with [Chef and InSpec](kitchen-chef/README.md)
|
||||
- `kitchen-puppet` Test-Kitchen with [Puppet and InSpec](kitchen-puppet/README.md)
|
||||
- `kitchen-ansible` Test-Kitchen with [Ansible and InSpec](kitchen-ansible/README.md)
|
53
examples/kitchen-ansible/README.md
Normal file
53
examples/kitchen-ansible/README.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# InSpec Test-Kitchen Example with Ansible and InSpec
|
||||
|
||||
This example demonstrates a complete roundtrip via [Test-Kitchen](http://kitchen.ci/).
|
||||
|
||||
```bash
|
||||
# install all dependencies
|
||||
$ bundle install
|
||||
# show all available tests
|
||||
$ bundle exec kitchen list
|
||||
Instance Driver Provisioner Verifier Transport Last Action
|
||||
default-centos-71 Vagrant AnsiblePlaybook Inspec Ssh <Not Created>
|
||||
default-ubuntu-1204 Vagrant AnsiblePlaybook Inspec Ssh <Not Created>
|
||||
default-ubuntu-1404 Vagrant AnsiblePlaybook Inspec Ssh <Not Created>
|
||||
|
||||
# Now we are ready to run a complete test
|
||||
$ bundle exec kitchen test default-ubuntu-1404
|
||||
-----> Starting Kitchen (v1.4.2)
|
||||
-----> Cleaning up any prior instances of <default-ubuntu-1404>
|
||||
-----> Destroying <default-ubuntu-1404>...
|
||||
Finished destroying <default-ubuntu-1404> (0m0.00s).
|
||||
-----> Testing <default-ubuntu-1404>
|
||||
-----> Creating <default-ubuntu-1404>...
|
||||
Bringing machine 'default' up with 'virtualbox' provider...
|
||||
==> default: Importing base box 'opscode-ubuntu-14.04'...
|
||||
|
||||
...
|
||||
|
||||
Vagrant instance <default-ubuntu-1404> created.
|
||||
Finished creating <default-ubuntu-1404> (0m37.51s).
|
||||
-----> Converging <default-ubuntu-1404>...
|
||||
Preparing files for transfer
|
||||
Preparing playbook
|
||||
|
||||
...
|
||||
|
||||
Finished converging <default-ubuntu-1404> (1m14.53s).
|
||||
-----> Setting up <default-ubuntu-1404>...
|
||||
Finished setting up <default-ubuntu-1404> (0m0.00s).
|
||||
-----> Verifying <default-ubuntu-1404>...
|
||||
.....
|
||||
|
||||
Finished in 0.08796 seconds (files took 1 minute 52.3 seconds to load)
|
||||
5 examples, 0 failures
|
||||
|
||||
Finished verifying <default-ubuntu-1404> (0m0.27s).
|
||||
-----> Destroying <default-ubuntu-1404>...
|
||||
==> default: Forcing shutdown of VM...
|
||||
==> default: Destroying VM and associated drives...
|
||||
Vagrant instance <default-ubuntu-1404> destroyed.
|
||||
Finished destroying <default-ubuntu-1404> (0m4.41s).
|
||||
Finished testing <default-ubuntu-1404> (1m56.73s).
|
||||
-----> Kitchen is finished. (1m57.06s)
|
||||
```
|
|
@ -1,4 +1,4 @@
|
|||
# InSpec Test-Kitchen Example
|
||||
# InSpec Test-Kitchen Example with Chef and InSpec
|
||||
|
||||
This example demonstrates a complete roundtrip via [Test-Kitchen](http://kitchen.ci/).
|
||||
|
||||
|
|
53
examples/kitchen-puppet/README.md
Normal file
53
examples/kitchen-puppet/README.md
Normal file
|
@ -0,0 +1,53 @@
|
|||
# InSpec Test-Kitchen Example with Puppet and InSpec
|
||||
|
||||
This example demonstrates a complete roundtrip via [Test-Kitchen](http://kitchen.ci/).
|
||||
|
||||
```bash
|
||||
# install all dependencies
|
||||
$ bundle install
|
||||
# show all available tests
|
||||
$ bundle exec kitchen list
|
||||
Instance Driver Provisioner Verifier Transport Last Action
|
||||
default-centos-71 Vagrant PuppetApply Inspec Ssh <Not Created>
|
||||
default-ubuntu-1204 Vagrant PuppetApply Inspec Ssh <Not Created>
|
||||
default-ubuntu-1404 Vagrant PuppetApply Inspec Ssh <Not Created>
|
||||
|
||||
# Now we are ready to run a complete test
|
||||
$ bundle exec kitchen test default-ubuntu-1404
|
||||
-----> Starting Kitchen (v1.4.2)
|
||||
-----> Cleaning up any prior instances of <default-ubuntu-1404>
|
||||
-----> Destroying <default-ubuntu-1404>...
|
||||
Finished destroying <default-ubuntu-1404> (0m0.00s).
|
||||
-----> Testing <default-ubuntu-1404>
|
||||
-----> Creating <default-ubuntu-1404>...
|
||||
Bringing machine 'default' up with 'virtualbox' provider...
|
||||
==> default: Importing base box 'opscode-ubuntu-14.04'...
|
||||
|
||||
...
|
||||
|
||||
Vagrant instance <default-ubuntu-1404> created.
|
||||
Finished creating <default-ubuntu-1404> (0m33.62s).
|
||||
-----> Converging <default-ubuntu-1404>...
|
||||
Preparing files for transfer
|
||||
|
||||
...
|
||||
|
||||
Finished converging <default-ubuntu-1404> (0m48.95s).
|
||||
-----> Setting up <default-ubuntu-1404>...
|
||||
Finished setting up <default-ubuntu-1404> (0m0.00s).
|
||||
-----> Verifying <default-ubuntu-1404>...
|
||||
.....
|
||||
|
||||
Finished in 0.08278 seconds (files took 1 minute 22.81 seconds to load)
|
||||
5 examples, 0 failures
|
||||
|
||||
Finished verifying <default-ubuntu-1404> (0m0.22s).
|
||||
-----> Destroying <default-ubuntu-1404>...
|
||||
==> default: Forcing shutdown of VM...
|
||||
==> default: Destroying VM and associated drives...
|
||||
Vagrant instance <default-ubuntu-1404> destroyed.
|
||||
Finished destroying <default-ubuntu-1404> (0m3.97s).
|
||||
Finished testing <default-ubuntu-1404> (1m26.79s).
|
||||
-----> Kitchen is finished. (1m27.34s)
|
||||
|
||||
```
|
Loading…
Add table
Reference in a new issue