Commit graph

637 commits

Author SHA1 Message Date
Jared Quick
3623454153 Remove ruby headers from azure docs.
Signed-off-by: Jared Quick <jquick@chef.io>
2018-02-15 13:24:21 -05:00
kagarmoe
dc0d2727bc removes OS metadata from headers
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-15 09:54:17 -08:00
Kimberly Garmoe
a966cbd2b5 Formatting on XML resource (#2647)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-15 09:33:56 -05:00
Kimberly Garmoe
1218949d86 Normalizes terms accross resources (#2649)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-15 09:33:22 -05:00
kagarmoe
d63d15c457 Fixes formatting on aws/azure resources
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-14 20:33:18 -08:00
kagarmoe
b9162f5c1b Escapes and formatting 2018-02-14 20:33:18 -08:00
Clinton Wolfe
58629faf46
Document the terminology changeup for Azure creds (#2640)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-14 18:52:36 -05:00
kagarmoe
11d46622cc Changes aws docs extensions to .md.erb
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-14 13:29:27 -08:00
Clinton Wolfe
6c0422fbf0
Improvements and matcher renaming on aws_iam_password_policy (#2638)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-14 15:59:57 -05:00
Clinton Wolfe
33787124a7 Two deprecations in aws_ec2_instance (#2637)
* Drop deprecation warning for old name of aws_ec2

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-14 15:08:34 -05:00
Clinton Wolfe
4f341acfbc
Catch cloud exceptions and document connection info (#2636)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-14 14:15:20 -05:00
Jared Quick
f32c712a4c Merge branch 'master' into release-2.0 2018-02-14 09:36:44 -05:00
kagarmoe
c741e51484 AWS resource edits
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 17:44:01 -08:00
kagarmoe
86652992b0 AWS resource edits
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 17:44:01 -08:00
Jared Quick
686b028886 Add reporters reference page (#2617)
* Add reporters reference page.

Signed-off-by: Jared Quick <jquick@chef.io>

* Cleanup reporters page with suggestions.

Signed-off-by: Jared Quick <jquick@chef.io>

* Reorder reporters.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-02-13 21:27:42 +01:00
Jared Quick
fde895f74a Merge branch 'master' into release-2.0 2018-02-13 15:11:53 -05:00
Jerry Aldrich
9ebd807ea4 http resource: Make remote worker the default (#2520)
* http resource: Make remote worker the default

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-02-13 12:42:16 -05:00
Franklin Webber
8f8ae290b4 Fixes the docs content for the user resource (#2553)
* Removed additional ending brackets } in a few cases
* Removed the belong_to_group
* Cleans white space and addressed a little formatting

Signed-off-by: Franklin Webber <franklin@chef.io>
2018-02-13 12:40:58 -05:00
Kimberly Garmoe
925c5bca8e Refactors kernel_parameter resource (#2625)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 12:37:30 -05:00
Kimberly Garmoe
e5cacc3105 Refactors key_rsa resource (#2627)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 12:35:14 -05:00
Kimberly Garmoe
78f51f8d9c Refactors limits_conf resource (#2629)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 12:34:51 -05:00
Kimberly Garmoe
2a52537196 Refactors the login_def resource (#2630)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-13 12:34:36 -05:00
Clinton Wolfe
2708a73e11 Merge branch 'aws-core-onramp' into aws-merge 2018-02-09 00:56:28 -05:00
Clinton Wolfe
d696c8b83f Merge branch 'cw/rename-resources' into core-onramp 2018-02-08 17:00:49 -05:00
Kimberly Garmoe
07e3e9fbdc Refactors grub_conf doc sligtly; adds os metadata (#2537)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:45:42 +01:00
Kimberly Garmoe
44abd94991 Kg/interface (#2550)
* Refactors interface docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes formatting

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:43:50 +01:00
Kimberly Garmoe
bd73b69c9e Refactors ini docs (#2544)
* Refactors ini docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes formatting

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes formatting

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:43:21 +01:00
Kimberly Garmoe
3f0642eef1 Refactors inetd_conf doc (#2543)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:42:51 +01:00
Kimberly Garmoe
f1b78c65d5 Refactors iis_site doc (#2542)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:42:12 +01:00
Kimberly Garmoe
a114a3015e Refactors iis_app docs (#2541)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:41:41 +01:00
Kimberly Garmoe
c7b9c56a34 Refactors http doc (#2540)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 22:41:14 +01:00
Clinton Wolfe
dfc73a52f0 Merge branch 'release-2.0' into aws-merge-release-merge-try
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-08 10:44:11 -05:00
Clinton Wolfe
6aaab8691c Merge branch 'aws-merge-prep' into aws-merge
Includes train aws:// targeting and some new resources

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-08 10:09:57 -05:00
Jared Quick
9bc0a5a32f Merge branch 'master' into release-2.0 2018-02-08 09:48:23 -05:00
Jerry Aldrich
84817366a1 Remove deprecations for InSpec 2.0 (#2506)
* Add `release-2.0` target branch to AppVeyor/Travis (#2510)

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* simpleconfig: Remove deprecated config keys

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* cli (exec): Remove `--cache` command line argument

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* platform: Remove lowercase os name protection

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `contain_legacy_plus` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `contain_match` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `with_version` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `belong_to_group` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `belong_to_primary_group` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* matcher: Remove `contain` matcher

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* passwd: Remove deprecated properties

This removes:
  - `passwd.count`
  - `passwd.username`
  - `passwd.usernames`
  - `passwd.uid`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* auditd_rules: Remove in favor of `auditd` resource

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* cli: Remove `login_automate` command

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Remove `resource_skipped` message method

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-02-08 11:05:21 +01:00
Christoph Hartmann
b40876715f
Merge pull request #2536 from chef/jq/merge_inspec_azure
Merge inspec-azure into inspec core
2018-02-08 10:57:05 +01:00
Kimberly Garmoe
f32bcdb74d Adds glossary.md file (#2450)
* Adds glossary.md file

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* Adds glossary to sidebar and updates page formatting

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Changes glossary layout

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Replaces errant tic

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Requested changes

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Clarifies filter clause

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-08 10:00:51 +01:00
Clinton Wolfe
a0b6bac87b
Use train for AWS connection (#219)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-07 23:26:37 -05:00
Clinton Wolfe
4e07508317 Rename classes and resource names in files
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-07 23:23:05 -05:00
Clinton Wolfe
162335aa60 Move files for rename
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-07 22:56:45 -05:00
Clinton Wolfe
4d8eb48855
Skeletal aws_vpc_subnets resource (#228)
Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-07 20:12:02 -05:00
Miah Johnson
046b2ef419 Skeletal Resource: aws_route_table (#217)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-02-07 10:48:55 -05:00
Kimberly Garmoe
f4d08fbb40 Refactors crontab docs & adds 'property examples' (#2513)
* Refactors crontab docs & adds 'property examples'

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* adds note about crontab-supported time strings

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 16:11:28 +01:00
Matthew Dromazos
16fee68c88 Skeletal Resource: aws_vpc_subnet (#209)
Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-02-07 10:03:11 -05:00
Clinton Wolfe
f7a11ee2df Merge branch 'aws-merge-prep' into aws-merge
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-07 09:53:21 -05:00
Kimberly Garmoe
24120b9b26 Refactors dh_params resource and publishes (#2515)
* Refactors dh_params resource and publishes

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Adds dh_params resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes esc chars

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 15:35:04 +01:00
Kimberly Garmoe
4a203e647b Kg/csv (#2514)
* Refactors csv resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Copy edits

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Copy edit

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Clarifies property example

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 15:25:42 +01:00
Kimberly Garmoe
36dd93701f Kg/etc fstab (#2523)
* Refactors etc_fstab resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Edits to fstab

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Removes duplicate line

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes typo

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 15:24:49 +01:00
Kimberly Garmoe
7a47273f5f Refactors elasticsearch resource (#2522)
* Refactors elasticsearch resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes typo

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 15:23:53 +01:00
Kimberly Garmoe
16d4f71d2e Refactors the bond docs (#2504)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 15:17:59 +01:00
Kimberly Garmoe
ecf6900e9f Kg/file (#2529)
* Refactors file docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Adds deprecations and differentiates OS

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 14:29:30 +01:00
Kimberly Garmoe
f5acd5d34e Kg/filesystem (#2530)
* Refactores filesystem doc.

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Removes file

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-07 14:27:48 +01:00
Jared Quick
e0ab84b11a Merge branch 'jq/azure_merge' of /Users/jquick/Chef/inspec-azure into jq/merge_inspec_azure 2018-02-06 13:23:54 -05:00
Kimberly Garmoe
be2216a1b8 Kg/etc hosts (#2528)
* Refactors etc_hosts docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Copy edits

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:31:46 +01:00
Kimberly Garmoe
980a1329b2 Kg/gem (#2527)
* Refactors gem resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:31:11 +01:00
Kimberly Garmoe
1ce72eecd8 Refactors etc_hosts_allow docs (#2526)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:30:47 +01:00
Kimberly Garmoe
719783e2b2 Refactors etc_hosts_deny docs (#2525)
* Refactors etc_hosts_deny docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes typo

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Fixes terminal punctuation

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:30:09 +01:00
Kimberly Garmoe
ee18b7ef89 Refactors etc_group docs (#2524)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:29:15 +01:00
Kimberly Garmoe
15d4564c3a Updates directory resource (#2516)
* Updates directory resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Updates syntax example

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-06 12:27:09 +01:00
Kimberly Garmoe
bc3c5039f3 Updates aide-conf docs (#2493)
* Updates aide-conf docs

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Removes 'matchers' language.

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Really resolves merge conflict

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-05 19:57:45 +01:00
Kimberly Garmoe
b33aecec0c Updates auditd_conf doc (#2497)
* Updates auditd_conf doc

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* resolves merge conflict

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Moves example

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-05 19:56:36 +01:00
Kimberly Garmoe
903ab396f0 Refactors docker_service docs (#2519)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 08:13:56 -05:00
Kimberly Garmoe
73f2eebea5 Refactors docker_image resource (#2518)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 08:13:04 -05:00
Kimberly Garmoe
288e9f2607 Refactors docker_container resource (#2517)
* Refactors docker_container resource

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Edits matchers to properties

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 08:10:47 -05:00
Kimberly Garmoe
3e7e806eba Updates cran resource doc (#2512)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 07:36:36 -05:00
Kimberly Garmoe
d3a2957766 Kg/cpan (#2511)
* Refactors cpan resource doc

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Copy edit

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-02 07:35:50 -05:00
Kimberly Garmoe
16325b8a9b Refactors the bridge property (#2505)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:45:33 -05:00
Kimberly Garmoe
c9a226c4ab Refactors 'bash' resource docs page (#2500)
* Refactors 'bash' resource docs page

Signed-off-by: kagarmoe <kgarmoe@chef.io>

* Changes 'exist' description

Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:44:10 -05:00
Kimberly Garmoe
6ed7616ac9 Refactors bsd_service resource doc (#2507)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:43:16 -05:00
Kimberly Garmoe
66e25fab8d Refactors command resource (#2508)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 17:42:27 -05:00
Sam Cornwell
14efd94050 Skeletal aws_iam_group resource (#221)
Signed-off-by: Sam Cornwell <14048146+samcornwell@users.noreply.github.com>
2018-02-01 15:55:53 -05:00
Sam Cornwell
d722827ebd Skeletal aws_iam_groups resource (#208)
Signed-off-by: Sam Cornwell <14048146+samcornwell@users.noreply.github.com>
2018-02-01 13:09:48 -05:00
Rony Xavier
23b57ab591 Add have_access_logging_enabled matcher to aws_s3_bucket (#212)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-02-01 11:50:38 -05:00
Rony Xavier
7d53056751 Password usage properties for aws_iam_users (#213)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-02-01 11:23:25 -05:00
Clinton Wolfe
e2e9915aa4 Skeletal aws_kms_keys resource
Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-02-01 10:21:54 -05:00
Kimberly Garmoe
010ca42b2d Changes 'matcher' to 'property' in examples (#2499)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-02-01 11:51:12 +01:00
Rony Xavier
6ae80ad6f7 skeletal aws_iam_ policies resource (#193)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-01-31 22:45:02 -05:00
Rony Xavier
1b170dcfb6 aws_iam_access_keys incorrectly populates created_date (#215)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-01-31 22:16:30 -05:00
Kimberly Garmoe
7dc72c7491 Edits to audit_policy resource language (#2498)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-01-31 07:24:57 -05:00
Kimberly Garmoe
b45b77cd13 Simplifies 'matchers' language in docs (#2496)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-01-31 07:24:16 -05:00
Adam Leff
689fe34cc9 apache resource: document and deprecate (#2494)
* Docs for apache resource

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* Add deprecation warning to apache docs and resource, and clean up examples.

Signed-off-by: Adam Leff <adam@leff.co>

* Update apache_conf resource to remove dependency on apache resource

Signed-off-by: Adam Leff <adam@leff.co>

* Make conf_dir method public

Signed-off-by: Adam Leff <adam@leff.co>

* Removes unnecessary aide_conf commit, pulled in from e25f0a45

Signed-off-by: Adam Leff <adam@leff.co>

* Switch to Pathname to calculate conf_dir

Needed to avoid Windows adding `C:\` in unit tests when calling
File.expand_path.

Signed-off-by: Adam Leff <adam@leff.co>
2018-01-31 11:16:15 +01:00
Franklin Webber
2cc446a686 Doc fixes the apache_conf properties returns an array (#2479)
* Fixes the apache_conf Listen property returns an array

The result is an array and not a string even when there is one value.

Signed-off-by: Franklin Webber <franklin@chef.io>

* Updates the apache_conf timeout, allowoverride, and maxclients to include

It seems that all of these values are placed in an array of values so
the matcher needs to be `include`.

Signed-off-by: Franklin Webber <franklin@chef.io>

* Updates docs for apache_conf

* Uses the suggested `cmp` instead of `include`
* Adds the way to properly compare a list of multiple ports

Signed-off-by: Franklin Webber <franklin@chef.io>
2018-01-29 13:03:36 -05:00
Rony Xavier
f09d4f5266 aws_iam_policy resource (#184)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-01-26 15:21:49 -05:00
Jerry Aldrich
d96a6affa7 packages resource: Add architectures support (#2469)
This adds support for `architectures` to the `packages` resource.

Example:

```
describe packages(/compat-libstdc++-33/) do
  its('architectures') { should include 'x86_64' }
  its('architectures') { should include 'i686' }
end
```

This also adds documentation for the `packages` resource

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-01-25 23:57:34 -08:00
Vern Burton
55abdebdc9 filesystem resource: inspect linux filesystems (#2441)
* adding df resource

Signed-off-by: Vern Burton <me@vernburton.com>

* adding unit tests and required mocks for them, created integration test

Signed-off-by: Vern Burton <me@vernburton.com>

* cleaning up skip test to include only the filename and not full path

Signed-off-by: Vern Burton <me@vernburton.com>

* adding docs

Signed-off-by: Vern Burton <me@vernburton.com>

* size makes more sense than space

Signed-off-by: Vern Burton <me@vernburton.com>

* removing unneeded author lines

Signed-off-by: Vern Burton <me@vernburton.com>

* as the command changed, changing mock to the new sha

Signed-off-by: Vern Burton <me@vernburton.com>

* updating to address comments from #2441

* removing author lines
* using attr_reader functions
* using ruby string functions rather than pipe to sed
* adding os family detection
* using ResourceFailed as the pattern already existed for OS family detection
* using if for future case support for unix and unix-like (FreeBSD)

Signed-off-by: Vern Burton <me@vernburton.com>

* adding supports to resource metadata, and adding tests that show that resource says that it is not supported on windows/unix.

Signed-off-by: Vern Burton <me@vernburton.com>

* focusing on linux os family and removing logic for assumed future cases

Signed-off-by: Vern Burton <me@vernburton.com>

* changing df to filesystem

Signed-off-by: Vern Burton <me@vernburton.com>
2018-01-25 09:29:31 -05:00
Matt Kulka
c067798fc5 Docker Swarm service resource (#2456)
This change adds the `docker_service` resource for Docker swarm mode services. This
branches off some of the common elements (id, exists) into a `DockerObject` module along
with a utility function for parsing the image/repo string. That function was implemented
separately by `docker_image` and `docker_container`, now with a third resource, it made
sense to consolidate that into an included module. I used the most comprehensive
implementation. Existing classes had to be slightly modified for the genericization.

Signed-off-by: Matt Kulka <mkulka@parchment.com>
2018-01-23 12:30:14 -08:00
Rony Xavier
0af7105eba Functional aws_cloudtrail_trail resource (#186)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-01-23 11:26:27 -05:00
Rony Xavier
3a786babcf Skeletal aws_cloudtrail_trails resource (#191)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-01-23 11:06:05 -05:00
Rony Xavier
86843320df Correct access_key detection on aws_iam_root_user (#198)
Signed-off-by: Rony Xavier <rx294@nyu.edu>
2018-01-23 11:01:51 -05:00
Markus Grobelin
dee94b6416 pip resource docs: mention custom path to pip as introduced by GH-2097 (#2459)
Signed-off-by: Markus Grobelin <grobi@koppzu.de>
2018-01-19 17:03:00 -05:00
Clinton Wolfe
5ab68ecf03
aws_s3_bucket with modified interface (#183)
Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
    Signed-off-by: Aaron Lippold <lippold@gmail.com>
    Signed-off-by: Sam Cornwell <14048146+samcornwell@users.noreply.github.com>
    Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-01-19 11:50:08 -05:00
Sam Cornwell
e81937413b skeletal aws_vpcs (#182)
Signed-off-by: Sam Cornwell <14048146+samcornwell@users.noreply.github.com>
2018-01-18 10:51:06 -05:00
djenniex-bene
2cfc0acaae SMTP example for the ini resource was incorrect and did not work (#2461)
* SMTP example for the ini resource was incorrect and did not work

Obvious fix.

* Fixed documentation and removed semicolons as the ini parser includes those semicolons

Obvious fix.
2018-01-17 11:41:33 -08:00
Vern Burton
175c3e1189 xml resource: support fetching attributes (#2423)
* adding database.xml with attributes to files and mocking it in the helper.rb

Signed-off-by: Vern Burton <me@vernburton.com>

* adding logic to test class returned by XPATH and using functions from respective classes to fill a array for return, and unit and integration tests to ensure functionality

Signed-off-by: Vern Burton <me@vernburton.com>

* updating docs to show how attributes are used

Signed-off-by: Vern Burton <me@vernburton.com>

* 'and' instead of 'or' makes more sense

Signed-off-by: Vern Burton <me@vernburton.com>

* adding default else for capturing unknown classes from REXML

Signed-off-by: Vern Burton <me@vernburton.com>

* removing extra newline

Signed-off-by: Vern Burton <me@vernburton.com>

* adding fail case with enough information to debug in future case

Signed-off-by: Vern Burton <me@vernburton.com>
2018-01-16 14:26:39 -08:00
Vern Burton
9b4a276e9f firewalld resource: prepend rule string only when necessary (#2430)
* adding control statement to add rule in front of string as long as it doesn't already contain rule.

Correcting resource name in firewalld from etc_hosts_deny

adding tests for both branches of the statement created in firewalld

Signed-off-by: Vern Burton <me@vernburton.com>

* moving to unless with a start_with

Signed-off-by: Vern Burton <me@vernburton.com>

* adding documentation that states that it is not needed to add `rule` string

Signed-off-by: Vern Burton <me@vernburton.com>
2018-01-16 14:20:58 -08:00
Sam Cornwell
3d731a81f8 aws_vpc resource skeleton (#172)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Sam Cornwell <14048146+samcornwell@users.noreply.github.com>
2018-01-11 22:51:17 -08:00
Nathen Harvey
65589f8f78 Markdown titles sometimes need _s escaped (#2451)
When a header includes two `_`s, they must be escaped, otherwise, the
text between the two `_`s is rendered with emphasis.  E.g.,

`<h1 id="etchostsallow">etc<em>hosts</em>allow</h1>`

Escaping the `_`s fixes this and the header is rendered properly.

This is a fix for:

* etc_hosts_allow
* etc_hosts_deny
* postgres_hba_conf
* postgres_ident_conf

This change also adds the `h1` title to the windows_hotfix resource
page.

Signed-off-by: Nathen Harvey <nharvey@chef.io>
2018-01-08 13:09:13 -05:00
Dominik Richter
be9ece65b9 load local dependencies in inspec shell (#2438)
* add --depends to inspec shell

for loading dependencies from local folders. mainly used for development.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* lint

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* depends is not defined...

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* much nicer description for --depends

kudos @adamleff

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* add documentation for inspec shell --depends

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2018-01-04 14:39:01 -05:00
Eammon Hanlon
f6c7bffe78 Add bonding mode matcher to bond resource (#2414)
* Add mode method to test the value of Bonding Mode

Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>

* Add test for bonding mode in bond unit test

Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>

* Add documentation on mode matcher for bond resource

Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>

* Update example for 'Test parameters for bond0'

Signed-off-by: Eammon Hanlon <eammon.hanlon@microsoft.com>
2017-12-22 15:02:40 +01:00
Adam Leff
777c90e43a docs: fix XML resource example to use alternate syntax (#2395)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-22 14:56:18 +01:00
Jerry Aldrich
0178602d02 Correct .where usage in passwd documentation (#2419)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-12-21 22:59:20 -05:00
Franklin Webber
1cd7e1a120 Updates the docs for mysql_session (#2392)
* Fixes usage of 'output' to 'stdout'
* Adds examples for 'exit_status' and 'stderr'
* Modifies the matchers section to point to the command resource

Signed-off-by: Franklin Webber <franklin@chef.io>
2017-12-21 17:06:39 -05:00
Aaron Lippold
9784520d83 fixed 'count' to 'entries.count' in aws_ec2_security_groups as per the docs (#142)
* * added 'count' to `aws_ec2_security_groups`

Fixes #141

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-12-20 12:20:09 -05:00
Clinton Wolfe
e00ec2df5e
Add created_with_user filter criteria to aws_iam_access_keys
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-12-15 00:07:28 -05:00
Clinton Wolfe
a33146f9a4
Skeleton aws_ec2_security_group resource
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-12-14 09:28:29 -05:00
Clinton Wolfe
4229974e7d
Skeleton resource for aws_ec2_security_groups
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-12-13 22:36:23 -05:00
Clinton Wolfe
e5dc4a1c29
Add skeleton of aws_iam_role
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-12-13 22:34:52 -05:00
Russell Seymour
cdbe8c1016 Create azure_generic_resource
* Rewrite of Inspec Azure Resource pack to allow the testing of _any_ value Azure reosurce.
Closes #36
Closes #37

This fixes #56 so that it works with the latest version of the SDK. In fact it will only work to version >= 0.15

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-12-12 13:20:22 -05:00
Adam Leff
470582a84e xml resource: update docs with alternate syntax for keys with periods (#2389)
Signed-off-by: Adam Leff <adam@leff.co>
2017-12-12 16:31:50 +01:00
Andy Boutte
ac5ca9b5bc Added missing quote and removed extra bracket (#2386)
Signed-off-by: Andy Boutte <andy.boutte@reancloud.com>
2017-12-11 15:07:54 -05:00
Jordan Craig
d928c76702 Fix incorrect case in paragraph. (#2363)
Incorrect case used in paragraph to describe interactive debugging with Pry.

Obvious fix.
2017-12-04 11:55:33 -05:00
Patrick Münch
bd6a8fd980 kernel_module: correct docs style for code boxes (#2348)
Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
2017-11-28 18:12:05 -05:00
David Alexander
71b90f1b22 file resource: fix NilClass error when using advanced windows permissions (#2344)
* Fixes #2343 (Windows file permissions regression)

Signed-off-by: David Alexander <opensource@thelonelyghost.com>

* Updates docs with missing info on `be_allowed()` matcher

Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2017-11-28 09:18:49 +01:00
Patrick Münch
95f825aec2 correct syntax of first describe example and correct style of further examples (#2324)
* remove second end in first describe example, because of wrong syntax

Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>

* correct style of the examples

Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
2017-11-27 11:15:51 -05:00
Clinton Wolfe
245efc4230
Add aws_iam_access_keys resource (#112)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-11-22 14:17:36 -05:00
Clinton Wolfe
fdd04e31c6
Add aws_cloudwatch_alarm resource (#119)
Adds aws_cloudwatch_alarm resource.
2017-11-22 14:04:13 -05:00
Clinton Wolfe
351b200a88 Add Cloudwatch Log Metric Filter resource (#116)
* Full docs, first draft; integration tests; started on unit tests
* Integration tests pass
* Docs update 
* More consistent syntax in examples
* Alter fetch phase to perform fetch, handle results, and unpack into instance vars, more like other resources
2017-11-22 12:32:19 +01:00
Adam Leff
0e8eccfa9b Add clarification to INI resource re: settings in sections (#2320)
Signed-off-by: Adam Leff <adam@leff.co>
2017-11-20 13:08:51 +01:00
dragon788
a1672dac28 Fix minor typo (#2319)
Amazingly doesn't appear anywhere else in the codebase from a brief search.

Obvious fix.
2017-11-17 16:47:45 -05:00
Clinton Wolfe
ab2170f717 Add aws_sns_topic resource (#120)
* Docs first draft, integration tests, and constructor unit tests for SNS topic

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Skeleton of SNS topic

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Constructor arg validation works

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Passing unit tests for recall

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Subscription Count property, works

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Subscription, not subscriber

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Integration tests pass; also wildard ARNs are not allowed

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rubocop changes

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Doc updates per kagarmoe

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-11-17 01:44:43 +07:00
Jerry Aldrich III
43b71ff132 Add non-halting exception support to resources (#2235)
* Add non-halting exception support to resources

This adds two `Inspec::Exceptions` that can be used within resources to
either skip or fail a test without halting execution.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-11-06 13:28:53 -05:00
Szymon Szypulski
615779c538 Use names when quering for containers (#2270)
Name does not work.

Obvious fix.
2017-10-31 16:37:33 -04:00
Clinton Wolfe
82dc6f3ec7
Documentation for existing resources
* Update docs in source to use matcher-style calls, not properties-as-predicates

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Main doc file for aws_iam_user

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add documentation for existing resources

This adds documentation for the following resources, including custom matchers:

  - aws_ec2_instance
  - aws_iam_access_key
  - aws_iam_password_policy
  - aws_iam_root_user
  - aws_iam_users

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Fix `aws_iam_users` example (Console + No MFA) (#104)

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Correct copypasta

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Remove misleading singular matcher information from the plural docs for aws_iam_users

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Correct `aws-iam-userss` typo (#105)

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add EC2 instance state info

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* test commit

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* copy edits

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* Yikes, forgot to save after correcting a merge conflict

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-10-27 16:31:36 -04:00
Adam Leff
cdbb288d39 shadow resource: Docs clarification of the passwords property (#2269)
Signed-off-by: Adam Leff <adam@leff.co>
2017-10-27 10:31:48 +02:00
Adam Leff
a238083403 Fix the docs for the shadow resource (#2266)
* Fix the docs for the shadow resource

Inspired by the work in PR #2246

Signed-off-by: Adam Leff <adam@leff.co>

* Fix typo

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-25 12:23:52 -04:00
Markus Grobelin
2251270929 cran resource: check for R module installation (#2255)
* Added CRAN resource to check R modules

control 'cran-1' do
  impact 1.0
  desc '
    Ensure R module DBI is installed.
  '

  describe cpan('DBI') do
    it { should be_installed }
    its('version') { should cmp >= '3.0' }
  end
end

Signed-off-by: Markus Grobelin <grobi@koppzu.de>

* cran resource: made lint happy, added negative unit test, removed unused arg perl_lib_path

Signed-off-by: Markus Grobelin <grobi@koppzu.de>
2017-10-25 16:14:29 +02:00
Markus Grobelin
c626dfdbd9 cpan resource: check for Perl module installation (#2254)
* Added CPAN resource to check Perl modules

control 'cpan-1' do
  impact 1.0
  desc '
    Ensure Perl modules DBI and DBD::Pg are installed.
  '

  describe cpan('DBI') do
    it { should be_installed }
  end

  describe cpan('DBD::Pg') do
    it { should be_installed }
    its('version') { should cmp >= '3.0' }
  end
end

Signed-off-by: Markus Grobelin <grobi@koppzu.de>

* cpan resource: fixed unit test for non-installed module

Signed-off-by: Markus Grobelin <grobi@koppzu.de>
2017-10-25 16:01:26 +02:00
lhasadreams
7df4d2d418 Corrected name to be service_name (#2262)
Signed-off-by: Adrian Daniels <adrian@chef.io>
2017-10-24 17:51:30 -04:00
Adam Leff
8dc48533aa new resource: elasticsearch resource, test cluster/node state (#2261)
* new resource: elasticsearch resource, test cluster/node state

This is a new resource for testing an Elasticsearch cluster. It operates
by fetching the `_nodes` endpoint from a given Elasticsearch node and
collects data about each node in a cluster, even if there's only a
single node.

This work is based on inspiration from an initial PR #1956 submitted by
@rx294.

Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Adam Leff <adam@leff.co>

* Reduce mock data on non-default tests

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-20 17:28:48 -04:00
J Burns
58eae32688 etc_fstab resource: properly namespace the resource, add nfs_file_systems documentation (#2190)
* Updated nfs_file_systems example in docs

Signed-off-by: Jennifer Burns <jburns@mitre.org>
2017-10-12 11:30:33 +01:00
eramoto
b0e9654712 Fix documentation of split matcher (#2240)
Describes actual behavior for the `split` of os_env matcher.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2017-10-12 07:45:37 +01:00
Adam Leff
cbf58c7afa Enhance cmp matcher to work with symbols, fix file documentation (#2224)
* Enhance cmp matcher to work with symbols

The `cmp` matcher will now stringify symbol actual values if the
expected value was passed in as a string. This will help with the file
resource `type` method where Train returns the file type as a symbol.

Signed-off-by: Adam Leff <adam@leff.co>

* Fix documentation for file type character_device

Signed-off-by: Adam Leff <adam@leff.co>

* Fix docs for block_device

Signed-off-by: Adam Leff <adam@leff.co>

* Fix file mtime docs

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-07 12:28:07 +02:00
Adam Leff
939ee5ecfc processes resource: support busybox ps (#2222)
This change enhances the processes resource to support the busybox
ps command which is common on Alpine, for example. The way we
map ps fields to the structs needed by FilterTable have also been
refactored to be more flexible so we can support multiple formats
in the future.

Also, the processes resource now allows the grep argument to be optional
thus allowing a user to query all resources without passing in a
match-all regex.

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-06 19:32:39 +02:00
Adam Leff
359fd48af0 Update docs for the os resource (#2218)
The docs for the `os` resource did not have the proper parameters
listed and also improperly had `os[:debian]` examples instead of
`os.debian?`

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-06 15:44:32 +02:00
Clinton Wolfe
90fc6affd2 Docs: describe custom matcher cmp on version strings (#2214)
* Docs update to describe using cmp for version matching on packages

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add 'and' and force Travis to re-run checks

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-10-05 13:18:12 -04:00
Adam Leff
21ba43d6a5 http resource: properly execute tests on remote target (#2209)
Currently, the http resource always executes locally, even when scanning
a remote machine with `--target` which leads to undesireable behavior.

This change adds the ability to remotely execute tests with curl. This
behavior is currently opt-in with the `enable_remote_worker` flag, but
will become the default behavior in InSpec 2.0. Deprecation warnings
are emitted if the user is scanning a remote target but has not opted
in to the new behavior.

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-04 22:44:09 +02:00
Adam Leff
97a9b3f42a Adding examples of using expect syntax (#2213)
As discussed during the Chef Community Summit 2017 in Seattle, many
more technical users wish to use `expect` syntax and wish to see
more examples of how to do so with InSpec resources.

Signed-off-by: Adam Leff <adam@leff.co>
2017-10-04 22:43:20 +02:00
Jerry Aldrich III
19c72e8a60 Fix docs/reference/resources/host rendering (#2193)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2017-10-04 12:34:02 -07:00
hannah-radish
9cfc86d2ab Resource documentation update (#2207)
Light formatting changes, change order of example and matchers, slight
color changes

Signed-off-by: hannah-radish <hmaddy@chef.io>
2017-10-03 17:35:10 -04:00
Nathen Harvey
340c9ca919 Clean-up kitchen-inspec reference doc (#2208)
* Clarify the copy
* Fix the name of the kitchen configuration file.  `.kitchen.yml`, not
* `kitchen.yml`
* Use proper syntax for specifying recipes in the sample code
* Use a valid Supermarket-based profile in the sample code
* Demonstrate using local InSpec tests

Resolves #1565

Signed-off-by: Nathen Harvey <nharvey@chef.io>
2017-10-03 17:25:27 -04:00
dromazmj
7fc7942ab1 firewalld resource: inspect the status and configuration of firewalld (#2074)
* New Resource - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* New Resource - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* New Resource - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* New Resource - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resourec - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resource - firewalld

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resource firewalld

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Modifications to new resource - firewalld

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Changing firewalld_command method to prepend the command with 'firewall-cmd' to reduce code reuse.

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Modifications made
	* installed? method now tells by checking if firewall-cmd is a command on the system
	* The firewalld_command method now strips the stdout of the return
	* added another test for testing multiple active zones

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Fixing rake lint issue

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Fixing match and returning boolean for seeing if firewalld is running

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Fixing lint issues

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Empty commit to rerun.  Accidentally updated branch.

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Rerunning test, accidentally updated branch. needs sign off commit

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>
2017-09-27 14:05:35 +02:00
dromazmj
b23a58b573 etc_hosts_allow and etc_hosts_deny resources: test the content of the tcpwrappers configuration files (#2073)
* New Resource-combined etc_hosts_allow etc_hosts_deny

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>
2017-09-25 13:49:04 -04:00
Matt Ray
e23249d635 windows_hotfix resource: test whether a Windows HotFix is installed (#2178)
* Add hotfix resource for Windows

Signed-off-by: Matt Ray <matthewhray@gmail.com>

* Renamed hotfix to windows_hotfix

Added additional unit test checking for KB that is not present on a box

Signed-off-by: Matt Ray <matthewhray@gmail.com>

* Integration test to spot-check for hotfixes

Queries the Windows operating system via Powershell for a list of all
installed hotfixes and spot-checks every 10th one with the
windows_hotfix resource. Checking hundreds is time-consuming. Also
checks to ensure a non-installed hotfix is not present.

Signed-off-by: Matt Ray <matthewhray@gmail.com>
2017-09-25 19:09:22 +02:00
Thomas Cate
fca83c6bb2 add example for checking last permissions octet (#2152)
* add example for checking last permissions octet

Signed-off-by: Thomas Cate <tcate@chef.io>

* Correctly describe the last permissions bit for file resource

Signed-off-by: Thomas Cate <tcate@chef.io>
2017-09-25 09:52:04 -04:00
Jennifer Burns
ec18dce62b auditd resource: test active auditd configuration against the audit daemon (#2133)
* Added auditd resource and documentation.

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Added unit tests for auditd resource and updated auditd_rules_test to match new entries in auditctl

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Removed all legacy code for audit < 2.3. Removed parens to create consistency.

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Updated method names and removed unnecessary content based on review

Signed-off-by: Jennifer Burns <jburns@mitre.org>
2017-09-18 21:47:18 +02:00
Adam Leff
7a3706a023 Add clarifying docs for mysql_conf resource (#2138)
The docs did not include examples for querying settings set within a named section.

Signed-off-by: Adam Leff <adam@leff.co>
2017-09-13 08:16:35 -04:00
Rony Xavier
7d2da0c199 nginx resource: audit the nginx binary and how it was compiled (#1958)
* nginx base resource

Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Rony Xavier <rx294@gmail.com>
2017-09-13 08:15:09 -04:00
dromazmj
70548ab754 etc_fstab resource: test contents of the /etc/fstab file (#2064)
* Adding support for fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* New Resource - etc_fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* New Resource - etc_fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resource - etc_fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resource - etc_fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to new resource - etc_fstab

Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>

* Modifications to docs of new resource etc_fstab

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>

* Modifications to new resource etc_fstab

Signed-off-by: dromazmj <dromazmj@dukes.jmu.edu>
2017-09-11 15:55:03 +02:00
Dominik Richter
19ab22f5e2 add nginx_conf accessors for http, servers, and locations (#2119)
* wip: extend nginx_conf for http+servers+locations

... well `http` entries really, but we couldnt just call it `https`.

the goal is to `nginx_conf.http` / `nginx_conf.servers` / `nginx_conf.locations` and then also have these calls cascaded down to simplify the access to these fields. the current pattern is rather tedious since we need to check for nil everywhere.

* add test for new nginx accessors

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* add docs for nginx-conf

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* fix all incorrect NGINX spellings in docs

* prevent edge-cases where nginx params are nil

for location, http, and servers

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* more descriptive to_s for nginx servers

as suggested by @adamleff, thank you!

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>

* add more descriptive to_s for nginx location

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-09-06 08:19:04 -04:00
Clinton Wolfe
f284962450 File Resource: add be_setgid, be_setuid, be_sticky matchers (#2104)
* Provisioner script to setup resource tests for setgid/setuid/sticky bit tests.  This appears to be the correct mechanism per docker_run, but I don't see any other provisioner scripts, so I suspect there is a different Chef-internal mechanism at play here.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* TDD Red for setgid/setuid/sticky File matchers

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add documentation for file resource sgid, sticky, and suid matchers

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add matchers to File for setgid, setuid, and sticky by aliasing existing predicates; TDD green

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Rubocop prefers alias to alias_method.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Lint before pushing, of course

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Correct spelling of setgid and setuid matchers in docs

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Add be_setgid, be_setuid, be_sticky matcher integration tests for File.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Revert "Provisioner script to setup resource tests for setgid/setuid/sticky bit tests.  This appears to be the correct mechanism per docker_run, but I don't see any other provisioner scripts, so I suspect there is a different Chef-internal mechanism at play here."

This reverts commit 42e672f3b1.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Revert "TDD Red for setgid/setuid/sticky File matchers"

This reverts commit a4f891fc7e.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2017-09-03 20:43:13 +02:00
Adam Leff
1a651f1741 Correct docs for the file resource (#2115)
The current docs refer to a method called `link_target` which does not
exist. `link_path` provides the functionality.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-31 16:51:33 -04:00
dromazmj
cb5b475bb1 etc_hosts resource: test the contents of the /etc/hosts file (#2065)
Signed-off-by: dromazos <dromazmj@dukes.jmu.edu>
2017-08-31 09:51:39 -04:00
Jonathan Morley
3e7d47505c Add support for XML files (#2107)
* Add support for XML files

Signed-off-by: Morley, Jonathan <jmorley@cvent.com>

* Use REXML instead of nokogiri

Signed-off-by: Morley, Jonathan <jmorley@cvent.com>
2017-08-31 09:56:14 +02:00
Kevin Formsma
94c2e8181c Add sensitive flag to resources to restrict logging output (#2017)
* Filter check output based on sensitive flag
-Updated check in formatters to filter check output during failures based on
sensitive metadata flag
-Added functional test of output filtering
-Updated documentation with blerb on usage
* Update output format for sensitive resources

Signed-off-by: Kevin Formsma <kevin.formsma@gmail.com>

* Update color output on new test

Update the color output to match the newly-expected non-color format if there are no tests that match.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-25 16:21:49 -04:00
Jennifer Burns
2cef15aec3 aide_conf resource: test configuration of the AIDE file integrity tool (#2063)
* Added aide_conf resource and subsequent files

* Updated to match on all selection lines

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Changed to use CommentParser and fixed typo

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Fix typo in test file

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Updated to address PR feedback

Signed-off-by: Jennifer Burns <jburns@mitre.org>
2017-08-25 22:13:43 +02:00
Adam Leff
367d42fb3a Properly handle held packages on dpkg-flavored OS (#2087)
* check the proper field for dpkg installation state fixes #2006

Signed-off-by: Mathieu Sauve-Frankel <msf@kisoku.net>

* Properly handle held packages on dpkg-flavored OS

InSpec was looking at the wrong field in `dpkg -s` output to determine
whether a package was installed or not. An installed, held package was
incorrectly reported as uninstalled.

This adds the proper unit tests and also adds a `be_held` matcher.

Thanks to @kisoku for the initial work in #2007.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-18 17:29:23 +02:00
Adam Leff
c92a7d5e58 Revamp profile inheritance/dependency documentation (#2081)
Reuse blog post content on profile inheritance for web site
based on feedback from colleagues and community members.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-17 16:11:11 +02:00
Adam Leff
61514c38a7 Remove github fetcher from docs (#2075)
The github fetcher does not exist. The git fetcher or URL fetcher is what users should use.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-15 13:47:28 -04:00
Kimberly Garmoe
baa0951b06 Kg/resource names (#2060)
* Changes resources/filename to match resource name

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* Deletes original resource files.

Signed-off-by: kgarmoe <kgarmoe@chef.io>
2017-08-15 13:41:04 -04:00
Rony Xavier
041f64a87f New 'be_in' matcher for matching against values in a list (#2022)
* New matcher 'be_in'
Fixes #2018

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* small fixes to wording.

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* Added code to use be_in for with the following use case:
describe nginx do
   its(module_list) { should be_in AUTHORIZED_MODULE_LIST }
end
Fixes #2018

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Updates to the matcher
Fixes #2018

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Added tests for the be_in matcher

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Requested updates completed

Signed-off-by: Rony Xavier <rx294@nyu.edu>
2017-08-07 16:05:22 +02:00
Adam Leff
c280e9a816 Fix host resolution on Darwin, use dig wherever possible (#1986)
* Fix host resolution on Darwin, use dig wherever possible

The `host` and `dig` commands do not return non-zero if a query returns NXDOMAIN
or NOERROR, but the DarwinHostProvider was expecting it when deciding whether to
fall back to IPv4 if a IPv6 query failed. Therefore, the `host` resource would
not function properly when resolving hostnames on Darwin. The logic has been
changed to use `dig` short output and query for both v6 and v4 addresses.

Additionally, the LinuxHostProvider has been modified to prefer `dig` if it's
available to keep behavior similar between Darwin and Linux whenever possible.
This has the added benefit of providing v6 and v4 resolution if possible where
`getent hosts` only returns v6 if v6 records exist.

Signed-off-by: Adam Leff <adam@leff.co>
2017-07-05 10:45:30 -04:00
Christoph Hartmann
3255054390 simplify kernel module docs (#1987)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-07-05 09:57:47 -04:00
Aaron Lippold
cc7ed38d09 kernel_module resource: added blacklisting, enabled, disabled, docs and unit tests (#1798)
* Fix up methods, add command mock, do string matching in ruby instead of command

Fixes #1643
Fixes #1673

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-07-05 11:41:44 +02:00
Aaron Lippold
224935e9cf New postgres_hba_conf resource (#1964)
* Created pg_hba_conf resource

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Created pg_hba_conf resource

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Corrections

* updated to parse auth-options

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* updated `conf_path` instance var to `conf_file` for consistancy.

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* pg_hba_conf - updated the parse_line method
added test and doc files

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Updated few bugs on pg_hba_conf
updated test files and docs

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Updated docs

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Made updates based on the reccomendations

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* PR commit

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* PR Commit

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Update Gemfile.lock

* PR Commit

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Updated doc file for postgres_hba_conf resource to use
'cmp' matcher instead of 'eq'

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Made requested changes, except for SimpleConfig - will address that later.

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-07-03 20:13:51 +02:00
Aaron Lippold
57864f1488 New postgres_ident_conf resource (#1963)
* Initial commit of pg_ident_conf resource

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Initial commit of pg_ident_conf resource

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Small updates to organization of code

Signed-off-by: Aaron Lippold <lippold@gmail.com>
Signed-off-by: Rony Xaiver <rx294@nyu.edu>

* updated `conf_path` instance var to `conf_file` since we are returning
a file.

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* Updated few bugs on pg_ident_conf
added test files and docs

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Updated docs

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Added mock folders

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Added mock folders

Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Aaron Lippold <lippold@gmail.com>

* Added mock folders

Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Aaron Lippold <lippold@gmail.com>

* Added OS check

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Added mock file

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Added mock folders

Signed-off-by: Rony Xavier <rx294@nyu.edu>
Signed-off-by: Aaron Lippold <lippold@gmail.com>

* added windows mock file

Signed-off-by: Aaron Lippold <lippold@gmail.com>

* Changed resource name from pg_ident_conf to postgres_ident_conf

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* Completed corrections reccomended on PR

Signed-off-by: Rony Xavier <rx294@nyu.edu>

* removed copyright information

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-07-03 20:01:40 +02:00
Christoph Hartmann
0839be50d6 oracle_session and mssql_session improvement (#1857)
* improve database parsing
* support sqlcli
* ensure headers are downcast
* externalize database helper
* use password as argument
* feedback from @adamleff
* inline docs update + linting
* stay backwards compatible
* implement tests
2017-06-29 11:01:32 -04:00
Jerry Aldrich III
cc6f1e90ca Add rpm_dbpath support to the package resource (#1960)
Signed-off-by: Jerry Aldrich III <jerry@chef.io>
2017-06-28 03:21:15 -07:00
Sean Walberg
a0ebc43132 Update iptables docs (#1968)
* Update iptables docs

* Correct nomenclature and be a bit more specific for existing exampls
* Provide an example of allowing a specified port in.

* Update iptables.md.erb
2017-06-28 03:17:24 -07:00
Aaron Lippold
3bb98fa1e8 Fixes the postgres_conf parsing of complex paramerters (#1938)
Fixes #1671

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-06-23 08:31:27 -07:00
Richard Shade
1fbd4b57a2 Mysql socket (#1933)
* showing how to shellout in docs

Signed-off-by: Richard Shade <rshade@rightscale.com>

* adding basic example

Signed-off-by: Richard Shade <rshade@rightscale.com>

* cleanup

Signed-off-by: Richard Shade <rshade@rightscale.com>

* adding in mysql socket, as this doesn't work with non-default installs

Signed-off-by: Richard Shade <rshade@rightscale.com>

* updating per peer review to make socket not a req, and adding port

Signed-off-by: Richard Shade <rshade@rightscale.com>

* updating docs

Signed-off-by: Richard Shade <rshade@rightscale.com>
2017-06-23 08:28:15 -07:00
DörteDev
b12f95ea76 attributes-related note added to docs (#1941)
* attributes-related note added to docs

Hello friends.

I just received two separate stacktraces and spent half an hour trying to figure out why my attribute()-calls didn't work. The Slack channel then notified me that these attribute()-calls must live on the top-level of the file. Thought I'd prepare a PR to save others this fight :)

Greetings from southern germany.

* attributes-related note added to docs

Hello friends.

I just received two separate stacktraces and spent half an hour trying to figure out why my attribute()-calls didn't work. The Slack channel then notified me that these attribute()-calls must live on the top-level of the file. Thought I'd prepare a PR to save others this fight :)

Greetings from southern germany.

Signed-off-by: Stefan Staudenmeyer <stefan.staudenmeyer@instana.com>

* attributes-related doc note -> added control block

Signed-off-by: Stefan Staudenmeyer <stefan.staudenmeyer@instana.com>
2017-06-23 07:45:11 -07:00
Justin Schuhmann
a69cd1efee Adds support for iis_app InSpec testing (#1905)
Signed-off-by: Justin Schuhmann <jmschu02@gmail.com>
2017-06-15 11:13:07 +02:00
Adam Leff
12a495c631 Add TCP reachability support on Linux for host resource (#1915)
* Add TCP reachability support on Linux for host resource

This enhances the `host` resource on Linux targets by using netcat
(if installed) to perform TCP reachability checks.

Signed-off-by: Adam Leff <adam@leff.co>

* documentation updates

Signed-off-by: Adam Leff <adam@leff.co>

* Appease rubocop

Signed-off-by: Adam Leff <adam@leff.co>
2017-06-09 18:18:51 +02:00
Takaaki Furukawa
4f34e3eb83 Add support for virtualization resource (#1803)
* Add support for virtualization resource

Signed-off-by: Takaaki Furukawa <takaaki.frkw@gmail.com>

* Add some methods and documentation

Signed-off-by: Takaaki Furukawa <takaaki.frkw@gmail.com>

* Refactor collect_data_linux method

Signed-off-by: Takaaki Furukawa <takaaki.frkw@gmail.com>

* Remove unnecessary hash from virtualization resource and update examples

Signed-off-by: Takaaki Furukawa <takaaki.frkw@gmail.com>
2017-06-07 14:10:29 +02:00
Juan Carlos Castillo Cano
1c98ff13f6 Support special cases for crontab resource
Signed-off-by: Juan Carlos Castillo Cano <jccastillocano@gmail.com>
2017-06-06 15:12:12 +02:00
username-is-already-taken2
9d9baeb09f Added windows support to the processes resource
Signed-off-by: username-is-already-taken2 <digitalgaz@hotmail.com>
2017-06-05 23:41:02 +01:00
Nathan L Smith
0f96c88d88 Add docs for http resource options
Signed-off-by: Nathan L Smith <smith@chef.io>
2017-05-30 11:33:59 -05:00
Adam Leff
333c7f15aa Updating docs to show the interface name is required
Signed-off-by: Adam Leff <adam@leff.co>
2017-05-29 15:20:50 -04:00
Adam Leff
9182ba8574 Update interface resource docs
The `interface` resource currently refers to methods that don't
yet exist. Fixing the docs for now and will add the features
later.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-29 15:20:50 -04:00
Adam Leff
0a50d288fc Merge pull request #1516 from grv87/master
Fix problem with `kitchen-inspec` link on website
2017-05-15 22:16:15 -04:00
Adam Leff
a5e5cc0dec Merge pull request #1714 from aaronlippold/postgres-session-update
updated the psql command so that it does not print the headers and ex…
2017-05-11 14:34:05 -04:00
Aaron Lippold
684d81d4c2 psql doesn't print headers + extra output + cconfigurable host + docs
Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-05-11 08:58:55 -04:00
Pete Higgins
489f6ff365 Fix typo s/oe/or/.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
2017-05-10 18:11:16 -07:00
Nolan Davidson
8f0756812c Add support for Windows auth in mssql_resourcet
This adds supports for connecting to MS SQL instances using Window
authentication rather than SQL authentication.  By leaving either the
user or password parameters blank causes the sqlcmd to leave off the -U
and -P params.  This will cause sqlcmd to authenticate as the current
Windows user.

Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-05-09 17:17:07 +02:00
Dominik Richter
00682eb2d2 Merge pull request #1751 from nsdavidson/add-oracle-session
Add an oracle_session resource
2017-05-09 13:21:53 +02:00
seph
af0bceef48 Adopting PR 1570 - fixing processes resource doc
As originally proposed in #1570, the documentation of
the `processes` resource could be clearer in its ability
to accept a regular expression. The original doc-only PR
was missing a DCO sign-off and had one required change
before it was able to be merged. The PR unfortunately
became stale.

Adopting the PR and merging under the obvious-fix /
doc-only-fix rule.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-09 12:24:00 +02:00
Dominik Richter
85f8721d71 Merge pull request #1768 from chef/nls/yaml-doc-fix
Correct supermarket and github inspec.yaml examples
2017-05-09 12:04:35 +02:00
Nathen Harvey
259537b8c6
Minor grammar fix.
Signed-off-by: Nathen Harvey <nharvey@chef.io>
2017-05-07 08:50:58 -04:00
Nolan Davidson
ba6745444e Renaming oracle_session to oracledb_session
Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-05-05 13:11:07 -04:00
Nolan Davidson
fbe7b8ddf8 Refactor to options hash and add unit tests
Switched the oracle_session resource to take an option hash and allow
for configuring hostname, DB_SID, and sqlplus binary path.

Added unit tests.

Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-05-05 09:29:38 -04:00
Nathan L Smith
b169bece52 Correct supermarket and github inspec.yaml examples
Signed-off-by: Nathan L Smith <smith@chef.io>
2017-05-04 16:10:13 -05:00
Dominik Richter
5d1765c9bb add inspec.profile.file(...) for profile files
Fixes https://github.com/chef/inspec/issues/1396

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-03 20:39:27 +02:00
Nolan Davidson
9cd69ce4af Add an oracle_session resource
This adds an oracle_session resource similar to the existing resource
for MySQL and MSSQL.  It assumes the sqlplus tool is installed and in
the path of the user InSpec connects as.

Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-05-02 10:50:20 -04:00
Adam Leff
bc2458bf5a
Fix YAML resource documentation
The `yaml` resource documentation was missing many clues that users
need to successfully use the resource.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-01 16:16:00 -05:00
Adam Leff
d95d666bc9
Fix ServerSpec migration doc rendering
RedCarpet table rendering was not enabled, and we need to treat
the resource names as code to avoid resources with two underscores
from being rendered as partial italics.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-01 15:18:49 -05:00
Grant Ridder
4daf948eec Converge inspec doesn't have yet from comma seperated list to bullet list
Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
2017-05-01 10:10:40 -07:00
Grant Ridder
82a478f2ba Improve "Which Serverspec resources are available in InSpec?" doc
- Switch serverspec and inspec resource compare to a table and fix the links
- Add links for serverspec resources not in inspec

Serverspec to InSpec markdown table generated with:
```
mapping = {
  bond: 'bond',
  bridge: 'bridge',
  command: 'command',
  cron: 'crontab',
  docker_container: 'docker_container',
  docker_image: 'docker_image',
  file: 'file',
  group: 'group',
  host: 'host',
  interface: 'interface',
  iis_website: 'iis_website',
  iis_app_pool: 'iis_website',
  iptables: 'iptables',
  kernel_module: 'kernel_module',
  linux_kernel_parameter: 'kernel_parameter',
  mysql_config: 'mysql_conf',
  package: 'package',
  port: 'port',
  ppa: 'apt',
  process: 'processes',
  service: 'service',
  user: 'user',
  windows_feature: 'windows_feature',
  windows_registry_key: 'registry_key',
  x509_certificate: 'x509_certificate',
  yumrepo: 'yum',
  zfs: 'zfs_pool'
}

serverspec_base = 'http://serverspec.org/resource_types.html#'
inspec_base = "https://www.inspec.io/docs/reference/resources/"

serverspec_max = serverspec_base.length + mapping.max_by{|k,v| k.length}[0].length * 2 + 4
inspec_max = inspec_base.length + mapping.max_by{|k,v| v.length}[1].length * 2 + 5

serverspec_header_half = ' ' * ((serverspec_max - 'Serverspec'.length) / 2)
inspec_header_half = ' ' * ((inspec_max - 'InSpec'.length) / 2)

puts "| #{serverspec_header_half}Serverspec#{serverspec_header_half} | #{inspec_header_half}InSpec#{inspec_header_half} |"
puts "|:#{'-' * serverspec_max}:|:#{'-' * inspec_max}:|"

mapping.each do |serverspec, inspec|
  serverspec_text = "[#{serverspec}](#{serverspec_base}#{serverspec})"
  padding = serverspec_max - serverspec_text.length
  serverspec_string = serverspec_text + ' ' * padding

  inspec_text = "[#{inspec}](#{inspec_base}#{inspec}/)"
  padding = inspec_max - inspec_text.length
  inspec_string = inspec_text + ' ' * padding

  puts "| #{serverspec_string} | #{inspec_string} |"
end
```

Signed-off-by: Grant Ridder <shortdudey123@gmail.com>
2017-04-28 15:03:04 -07:00
Adam Leff
a1769cc01b
Update inspec.io references in docs/code
The website is now at https://www.inspec.io - updating all inspec.io
references accordingly. :)

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-27 18:05:51 -04:00
Adam Leff
5c63210390 Merge pull request #1726 from chef/dr/ports-doc-cmp
use cmp in port docs instead of eq
2017-04-26 18:22:27 -04:00
Dominik Richter
84a59cab50 use cmp in port docs instead of eq
Fixes https://github.com/chef/inspec/issues/438

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-27 00:17:34 +02:00
Dominik Richter
1dafe50bd9 rename SimpleConfig / parse_config / parse_config_file options
See https://github.com/chef/inspec/issues/1709
Fixes https://github.com/chef/inspec/issues/1709

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-26 23:18:40 +02:00
Dominik Richter
a7771a4ebc describe the value ranges of impact
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-25 19:01:16 +02:00
Dominik Richter
6b2532224b add podcast link to docs on serverspec-inspec
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-25 15:49:56 +02:00
Dominik Richter
ec05c16797 reference docs to other tools in readme
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-25 15:44:33 +02:00
Christoph Hartmann
218bda9c34 Docker resource (#1566)
* add docker, docker_container, and docker_image resources

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-04-24 10:47:03 -04:00
Richard Shade
532efccf0e showing how to shellout in docs (#1689)
* showing how to shellout in docs

Signed-off-by: Richard Shade <rshade@rightscale.com>
2017-04-21 13:47:28 -04:00
Adam Leff
cdfabd9362 Fix docs pages for x509_certificate and key_rsa
These files were not named correctly and the docs rake task
was not picking them up.

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-21 07:22:12 +02:00
Dominik Richter
02e435b6d0 add rabbitmq config resource
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-04-12 20:51:12 +02:00
Christoph Hartmann
afc7859fdb add documentation for registry_key backslashes and #1281
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-04-07 10:57:02 +02:00
Dominik Richter
7562138248 Merge pull request #1623 from chef/adamleff/http-resource-warning
[www] Add warning to the http resource documentation
2017-04-05 16:41:08 +02:00
Doc Walker
692e660140 Fix #1617 Add dh_params resource (#1618)
* Fix #1617 Add dh_params resource

Signed-off-by: Doc Walker <4-20ma@wvfans.net>
2017-04-04 10:34:09 -04:00
Adam Leff
6b49303136
Add warning to the http resource documentation
Currently, the `http` resource only operates on the node on which
`inspec exec` is run, even if the user uses the `--target` flag.
This has caused some confusion in the community.

Until this can be fixed, this change adds a warning to the documentation.

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-03 17:21:15 -04:00
Adam Leff
fba3c68281
Fix protocols matcher text on ssl resource docs
The `protocols` matcher section on the `ssl` resource
doc page fell victim to some copy/paste. This change
updates the text to the correct description.

Signed-off-by: Adam Leff <adam@leff.co>
2017-04-03 15:21:08 -04:00
Adam Leff
1cf80737ad Yum resource fix for non-existent repos and repo info
If a repo did not exist, running matchers against it (such as `exist`)
were failing due to a bug in `#to_s` when fetching the repo name. The
`info` method would return nil and we'd still try to treat it as a hash.

This change ensures that info is always a hash, possibly empty if the
repo doesn't exist, and uses the repo name provided by the user rather
than shortening it to be consistent with our other resources which don't
manipulate the user input in the formatter.

Also added a method_missing to allow users to interrogate repo options,
such as baseurl or gpgcheck.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-29 10:42:25 +02:00
Adam Leff
5a12cddc9c
Add docs for habitat CLI commands
Adding a dedicated page for the InSpec/Habitat integration which
explains what it is, and details the commands a user needs to use
the integration.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-28 13:59:38 -04:00
joe.nuspl
1ab80ea052 Extend gem to take an optional gem_binary
Allows one to test whether gems are installed into an omnibus environment.

Signed-off-by: Joe Nuspl <nuspl@nvwls.com>
2017-03-24 22:28:42 -07:00
Christoph Hartmann
d2f000e435 refactor x509 resources and rsa key
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-03-22 11:44:32 +01:00
Richard Nixon
f66f0b3a18 Initial support for x509_certificate and rsa_key
* Includes unit tests
* Includes 2 new resources
* Includes documentation

Signed-off-by: Richard Nixon <richard.nixon@btinternet.com>
2017-03-22 10:00:48 +01:00
Adam Leff
bf36c0a7a7 Merge pull request #1555 from nvtkaszpir/patch-1
Update file.md with example how to test symlinked files
2017-03-15 09:00:32 -05:00
Michał Sochoń
7a935a204e Update file.md with example how to test symlinked files.
Added detailed example why and how.
Updated with suggestions from Adam Leff.

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2017-03-15 07:53:14 +01:00
Adam Leff
8155357d0a Add additional example for matching crontab commands
As raised in #1526, adding an additional example showing how
a user can use the `where` accessor to find commands matching
a pattern and write a test using the results.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-14 22:16:39 +01:00
Adam Leff
7667c9cb0a Merge pull request #1525 from spiffytech/patch-1
windows_task docs: Correct syntax error and misspelled word
2017-03-08 15:03:15 -07:00
Tristan Escalada
27d94c5037 Fixing a typo
changing paht to be path.
2017-03-03 14:03:54 -05:00
Russell Seymour
ef323e3b31 Updated resource to follow RSpec convention
Closes #31

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 14:08:33 +00:00
Russell Seymour
de1b7134ef Added new resources
Allows testing of network configurations
Closes #2

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 14:01:54 +00:00
Christoph Hartmann
e8e34c2ffe fix ident in cmp matcher docs
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-03-02 12:28:50 +01:00
Russell Seymour
47cda053fb Renamed matcher to admin_username
Closes #30

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 11:17:00 +00:00
Russell Seymour
40888db8c5 Added support for Managed Disks
Updated README and documentation
Closes #25

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 11:10:41 +00:00
Russell Seymour
cdc643974d Removed double space after . in text
Copied `eq` matcher text instead of linking
Renamed template files

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 10:41:05 +00:00
Russell Seymour
3e7880627f Added resource documentation
Closes #23

Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
2017-03-02 10:11:18 +00:00
spiffytech
152f056335 windows_task docs: Correct syntax error and misspelled word 2017-03-01 13:43:26 -05:00
Basil Peace
4bc1c1df4e
doc: Fix inspec.yml example with several supports settings
Mapping keys should be unique according to YAML specification.
Note that some implementations don't enforce it, but silenty
overwrite previous declaration. See e.g.
https://github.com/ruby/psych/issues/79

Signed-off-by: Basil Peace <grv87@yandex.ru>
2017-02-26 18:09:54 +03:00
Basil Peace
2b4f7ea5c9
doc: Fix problem with link to plugin_kitchen_inspec 2017-02-26 17:25:39 +03:00
Joseph Benden
1fdecc6680 Add FreeBSD support for ZFS datasets and pools
The following new resources have been added; however, they
presently only support FreeBSD and similar.

* `zfs_dataset`: tests if a named ZFS dataset is present
  and/or has certain properties.
* `zfs_pool`: tests if a named ZFS pool is present and/or
  has certain properties.

Additionally, the `mount` resource has been reworked to
include support for FreeBSD; while the existing class
was renamed to LinuxMountParser.

Unit-tests were added for all of the above.

Signed-off-by: Joseph Benden <joe@benden.us>
2017-02-22 10:29:49 -07:00
Adam Leff
417b791baa Adding new crontab resource
The crontab resource parses a particular user's crontab file into
individual entries and allows the user to assert information about
each entry as needed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-02-10 09:33:31 -05:00
Christoph Hartmann
78b7a2c680 Merge pull request #1435 from postgred/kernel_module_version
Version method for kernel_module
2017-01-27 17:49:23 +01:00
Andrey Aleksandrov
3783357e50
Add version method to kernel_module
Signed-off-by: Andrey Aleksandrov <postgred@gmail.com>
2017-01-27 13:33:41 +03:00
Christoph Hartmann
976e5d85e4 improve http header handling
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-01-26 17:16:37 +01:00
Guilhem Lettron
51ca98c468 Add an http test method
Signed-off-by: Guilhem Lettron <g.lettron@criteo.com>
2017-01-26 12:02:54 +01:00
Christoph Hartmann
791f2db2e5 Merge pull request #1407 from gscho/rhel-doc-fix
Fixed error in OS docs, added CentOS to redhat family docs.
2017-01-25 12:13:51 +01:00
Nathen Harvey
2eda02932f
'execution' is spelled correctly
Fixes a minor typo. The correct spelling is 'execution', not
'executation'

Signed-off-by: Nathen Harvey <nharvey@chef.io>
2017-01-24 23:19:30 -05:00
techraf
3741cbe9d4 Fix resource name 2017-01-20 22:19:02 +09:00
techraf
a86b438ce4 Use double quotes to prevent escaping backslash in the expected string 2017-01-16 12:30:57 +09:00
gscho
3b7711adbc Update os.md.erb 2017-01-08 19:59:02 -05:00
Gregory Schofield
452b716591 Fixed error in OS docs, added CentOS to rehat family docs. 2017-01-08 19:51:33 -05:00
Alex Pop
607de99f75 mention inspec vendor for compliance dependency
Signed-off-by: Alex Pop <apop@chef.io>
2016-12-22 12:11:46 +00:00
Christoph Hartmann
fd2e29da38 add guidance for Serverspec migration
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2016-12-15 18:14:05 +01:00
Christoph Hartmann
71127cf33e Merge pull request #1354 from jerryaldrichiii/fix-iis-site-example
Remove trailing `\\` from iis_site example
2016-12-12 11:06:32 +01:00
Jerry Aldrich III
f2e6577460 Remove trailing \\ from iis_site example
Signed-off-by: Jerry Aldrich III <jerry@chef.io>
2016-12-09 10:00:10 -05:00
Christoph Hartmann
a990d20fcd Merge pull request #1306 from username-is-already-taken2/digitalgaz/windows_task
Adding windows_task resource
2016-11-25 11:46:42 -07:00