Commit graph

4785 commits

Author SHA1 Message Date
Paul Welch
d3b90a7c9f Pw/pip windows bug (#2883)
* Add python check for pip resource

When checking pip resources, we should skip resource if python is not
installed or we will fail with an error when trying to parse the path.

* Check pip command on windows

On Windows, if pip has a newer version available, it adds an error
message to stderr. Now checking if both stderr and stdout on windows
have values. If so, assume pip package is installed.

* Clean up powershell query command

- Make it easier to read what the powershell command is doing
- Make it easier to read what the cmd_successful method lokos for

Signed-off-by: Paul Welch <pwelch@chef.io>
2018-03-29 13:01:59 -04:00
Chef Expeditor
9d5e638d8e Bump version to 2.1.20 by Expeditor 2018-03-29 16:53:22 +00:00
Jared Quick
2726f8e2b8
Pin to Train 1.3.0. (#2898)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-03-29 12:51:10 -04:00
Chef Expeditor
698a61d9fb Bump version to 2.1.19 by Expeditor 2018-03-29 16:50:51 +00:00
Trevor Bramble
a40f857e2b Change route_table_id regexp for correctness (#2885)
Without the terminating character ($), it just accepted any characters
at all after the initial matching set.

Also add some tests to assure we're raising appropriately.

Co-authored-by: Trevor Bramble <tbramble@chef.io>
Co-authored-by: Joshua Padgett <jpadgett@chef.io>

Signed-off-by: Trevor Bramble <tbramble@chef.io>
2018-03-29 12:50:40 -04:00
Chef Expeditor
57c36790a3 Bump version to 2.1.18 by Expeditor 2018-03-29 15:57:29 +00:00
Jerry Aldrich
2c4f041e9d powershell resource: Add support other OSs (#2894)
This adds `powershell` resource support for non-Windows OSs via `pwsh`
and Base64 encoded commands.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-03-29 11:57:15 -04:00
Franklin Webber
6665555a73 Fixes the two incorrect examples in the YAML doc (#2875)
Signed-off-by: Franklin Webber <franklin@chef.io>
2018-03-28 13:20:56 -04:00
Chef Expeditor
63e1dc0633 Bump version to 2.1.17 by Expeditor 2018-03-28 15:27:25 +00:00
Chef Expeditor
643ea50bd8 Bump version to 2.1.16 by Expeditor 2018-03-28 15:24:51 +00:00
Mo Shark
fc3f1708c4 Porting over the singular rds resource from the aws-inspec git repo (#2866)
Signed-off-by: HackerShark <melsharkawi@mitre.org>
2018-03-28 11:23:44 -04:00
Miah Johnson
d7fe3694c9 Add pry-byebug to our Gemfile. We all install this anyway, lets make it a (#2889)
bit easier to develop inspec =)

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-03-28 11:23:06 -04:00
Chef Expeditor
578ad09cd7 Bump version to 2.1.15 by Expeditor 2018-03-28 15:22:17 +00:00
eramoto
53a53820cf Mitigate trivial warning output on test (#2872)
* Mitigate trivial warning on test by initializing
Also fixes passing a ambiguous argument.
* Mitigate trivial warning by removing redundant method

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2018-03-28 11:22:01 -04:00
Chef Expeditor
a5ff79d308 Bump version to 2.1.14 by Expeditor 2018-03-26 19:44:43 +00:00
Omar J. Irizarry
ef8da475d3 registry_key resource was returning an incorrect value (#2871)
* registry_key resource was returning an incorrect value
when key value was greater than 2147483647
* added mock
* Fix issue with default reg key
(default) key was returning nil even when a value was present.

Signed-off-by: Omar Irizarry <irizarry_omar_j@network.lilly.com>
2018-03-26 15:44:31 -04:00
Nathan Haneysmith
002a589871 fix logic in examples for password used (#2874)
Signed-off-by: Nathan Haneysmith <nathan@chef.io>
2018-03-26 15:42:56 -04:00
Chef Expeditor
347ff48d51 Bump version to 2.1.13 by Expeditor 2018-03-26 18:28:22 +00:00
Jan Collijs
87f1f500de Fix: pointed concurrent-ruby to version 1.0 to fix dependencies (#2879)
Signed-off-by: Jan Collijs <github@visibilityspots.org>
2018-03-26 14:28:11 -04:00
Chef Expeditor
5d73d42d8c Bump version to 2.1.12 by Expeditor 2018-03-26 18:03:39 +00:00
Matthew Dromazos
0cbe5b60e5 New Skeletal Resource aws_config_delivery_channel (#2641)
* Initial commit of new skeletal resource aws_config_delivery_channel
* Changes delivery_frequency to be an integer and names delivery_frequency_in_hours
* Adds more documentation and clarifies descriptions
* Wraps API call in the aws_catch_errors function
* Changes config bucket name to use dashes instead of underscores
* Updates on master and changes directory location of build and integration files
* Fix integration tests to only create one ConfigRecorder

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-26 14:03:23 -04:00
Miah Johnson
afbb366e16 Update to newer sha for our forked unf_ext to resolve AIX builds. (#2870)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-03-23 10:18:06 -04:00
Chef Expeditor
30e7e74245 Bump version to 2.1.11 by Expeditor 2018-03-23 12:29:58 +00:00
Matthew Dromazos
603bef6f29 New Skeletal Resource aws_kms_key (#2746)
* Initial commit of skeletal resource aws_kms_key
* * Adds comments to rerun travis
* * Clarifies some parts of the doc.
* Changes matcher have_aws_key_manager to manged_by_aws
* Fixes copypasta
* Adds clarification to property names
* Fixes rescueing exceptions from the api
* raises exceptions in the unit tests

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-23 08:29:45 -04:00
Chef Expeditor
a6632a064e Update CHANGELOG.md to reflect the promotion of 2.1.10 2018-03-22 21:40:36 +00:00
Chef Expeditor
473a260279 Bump version to 2.1.10 by Expeditor 2018-03-22 21:07:04 +00:00
Trevor Bramble
bd8ef9d1d8
Remove obsolete mock (#2869)
This mock was a remenant of file reading tests that became obsolete with
the centralization of that code.

Signed-off-by: Trevor Bramble <tbramble@chef.io>
2018-03-22 14:06:53 -07:00
Chef Expeditor
81201fa988 Bump version to 2.1.9 by Expeditor 2018-03-22 18:53:06 +00:00
Christian Becker
15ab5ba9de Added support for proxy_command (#2385)
NOTE This is just a simple wrapper which relies on the underlying support being added to train: https://github.com/chef/train/pull/227

Signed-off-by: Christian Becker <c.becker@mediaevent.services>
2018-03-22 14:52:54 -04:00
Chef Expeditor
4321ecb603 Bump version to 2.1.8 by Expeditor 2018-03-22 17:38:55 +00:00
Matthew Dromazos
9077a7b17b New Skeletal Resource aws_sns_subscription (#2697)
* Initial commit of skeletal resource aws_sns_subscription
* Fixes errors in documentation
* Clarifies documentation
* Wraps calls to aws api in catch_aws_errors metho
* Fixes integration tests

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-22 13:38:40 -04:00
Chef Expeditor
eb5302074a Bump version to 2.1.7 by Expeditor 2018-03-22 16:59:20 +00:00
Trevor Bramble
be83af35c5
Revise /etc/hosts for correctness and clarity (#2863)
* Clean up test data, correct parse error handling
 * Use functional pipeline to avoid need for conditional clauses and clarify the intent of the comment parsing.
 * Extract magic strings to constants
 * Remove code and tests now covered by FileReader

Co-authored-by: Trevor Bramble <tbramble@chef.io>
Co-authored-by: Paul Welch <pwelch@chef.io>

Signed-off-by: Trevor Bramble <tbramble@chef.io>
2018-03-22 09:58:22 -07:00
Chef Expeditor
b568a1bce9 Bump version to 2.1.6 by Expeditor 2018-03-22 16:56:46 +00:00
Matthew Dromazos
1bb565c708 New Skeletal Resource aws_sns_topics (#2696)
* Initial commit of skeletal resource aws_sns_topics
* Adds clarification in documentation
* Adds functionality for calling the next token returned from aws api.
* Wraps api calls in the catch_aws_errs method

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-22 12:55:23 -04:00
David Alexander
9629bf6f73 Documentation: supports attribute of custom resource DSL (#2824)
* Documents `supports` attribute of custom resource DSL
* Uses html definition list for definitions
* Reverts <dl> changes to pure markdown again

Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2018-03-22 08:47:31 -04:00
Chef Expeditor
007e23af5b Bump version to 2.1.5 by Expeditor 2018-03-22 12:25:57 +00:00
eramoto
c7e87ca3e3 Unify method in which file content is read across all resources (#2359)
* Create file-check functionality into utility file

There are the similar issues as PR #2302. Almost resources return false
positives when a file does not exist or is not read.

* Replace to file-check functionality
* Fix dh_params and x509_certificate resources

If a file is empty, OpenSSL::PKey::DH and OpenSSL::X509::Certificate have
raised an exception and have skipped the inspection. Thus x509_certificate
and dh_params resources are not allowed to read a empty file.

* to_s of shadow expects filters is not nil
* Remove workaround of sshd_config

Removes the workaround of sshd_config since Travis CI fails due to a bug
of dev-sec/ssh-baseline and the PR #100 will fix it.

* Use init block variable in methods

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2018-03-22 08:25:45 -04:00
Chef Expeditor
8d8edea7f3 Bump version to 2.1.4 by Expeditor 2018-03-21 17:53:35 +00:00
Paul Welch
dc9ea8d1d2 Correct support platform for audit_policy (#2850)
Audity Policy resource is only used on the windows platform and
was incorrectly set to unix.

Fixes #2829

Co-authored-by: Trevor Bramble <tbramble@chef.io>
Co-authored-by: Paul Welch <pwelch@chef.io>

Signed-off-by: Paul Welch <pwelch@chef.io>
2018-03-21 13:53:24 -04:00
Chef Expeditor
8fa49b8428 Bump version to 2.1.3 by Expeditor 2018-03-21 17:47:19 +00:00
Jared Quick
4f6aa79cb8 Remove supports for generic resources. (#2848)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-03-21 10:45:23 -07:00
Chef Expeditor
716078c786 Bump version to 2.1.2 by Expeditor 2018-03-21 17:44:42 +00:00
Jared Quick
7045fb9193 Bump Thor to version 0.20.0. (#2843)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-03-21 10:44:28 -07:00
Miah Johnson
c3c2e8d244 Add unf_ext configuration to omnibus to allow building against our (#2854)
Add unf_ext configuration to omnibus to allow building against our forked unf_ext.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-03-21 13:17:34 -04:00
Paul Welch
a32a85eae5 Remove incorrect example from documentation (#2851)
Owner and mode are provided by the file resource, not ssh_config.

Fixes #2471

Co-authored-by: Trevor Bramble tbramble@chef.io
Co-authored-by: Paul Welch pwelch@chef.io

Signed-off-by: Paul Welch <pwelch@chef.io>
2018-03-21 12:52:51 -04:00
Franklin Webber
87a28b56bb The resource is login_defs not login_def (#2845)
The main index is displaying the wrong resource name. The url to the resource
is not correct either. This should generate the correct entry and path in the
docs.

Signed-off-by: Franklin Webber <franklin@chef.io>
2018-03-20 13:01:34 -04:00
eramoto
a687479e6c Fix typo in some docs (#2841)
Also includes fixes such as PostgreSQL, TCPMUX, and etc.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
2018-03-20 08:43:30 -04:00
Chef Expeditor
58d2b01d3f Bump version to 2.1.1 by Expeditor 2018-03-19 17:10:30 +00:00
Matthew Dromazos
555de72912 Skelatal resource: aws_s3_bucket_object (#2620)
* Initial commit of new resource
* Makes changes to docs to match changes to the resources.
* Adds clarifications in docs and changes it to be an erb file.
* Simplifies some unit tests
* Wraps calls to the api in a aws_catch_errors method
* Removes provisioner terraform code

Signed-off-by: Matthew Dromazos <dromazmj@dukes.jmu.edu>
2018-03-19 13:10:17 -04:00