-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add example cookbook for profile upload
Signed-off-by: Victoria Jeffrey <vjeffrey@chef.io>
- Loading branch information
Victoria Jeffrey
committed
Oct 27, 2016
1 parent
3b2721c
commit 65a2779
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
driver: | ||
name: vagrant | ||
synced_folders: | ||
- ["./profile_tar", "/opt", 'create: true'] | ||
|
||
provisioner: | ||
name: chef_zero | ||
|
||
platforms: | ||
- name: ubuntu-14.04 | ||
- name: centos-7.2 | ||
|
||
suites: | ||
- name: default | ||
run_list: | ||
- recipe[profile_upload::default] | ||
attributes: | ||
audit: | ||
collector: 'chef-compliance' | ||
server: "https://192.168.33.201/api" | ||
inspec_version: 1.2.1 | ||
insecure: true | ||
refresh_token: '4/0N2sqBYyHpmxwBO0KegXs7IPJ9tKF6qQDB9iCOA72pDJLGcHQ69XZWOIOIT6JEwlmBFnLd7o_UN5MlwMTM_ofg==' | ||
owner: admin | ||
profiles: | ||
- name: admin/hardening | ||
path: /opt/ssh-hardening.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
source 'https://supermarket.chef.io' | ||
|
||
metadata | ||
|
||
cookbook 'audit', path: '../../../audit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# profile_upload | ||
|
||
Example cookbook used to upload a profile to chef-compliance. | ||
|
||
To use this cookbook: | ||
|
||
1) ensure you update the .kitchen.yml with your: | ||
* chef-compliance server url | ||
* refresh_token | ||
* user (owner) | ||
|
||
2) create a directory in this directory named 'profile_tar', and stick an archived | ||
profile in there (something like: ssh-hardening.tar.gz) | ||
(Note: you can easily archive an existing profile using `inspec archive PATH`) | ||
|
||
3) run `kitchen converge` | ||
|
||
4) go look in chef-compliance, under the compliance profiles section, and see your | ||
uploaded profile! tada! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name 'profile_upload' | ||
maintainer 'The Authors' | ||
maintainer_email 'you@example.com' | ||
license 'all_rights' | ||
description 'Installs/Configures test-profiles' | ||
long_description 'Installs/Configures test-profiles' | ||
version '0.1.0' | ||
|
||
# If you upload to Supermarket you should set this so your cookbook | ||
# gets a `View Issues` link | ||
# issues_url 'https://github.com/<insert_org_here>/test-profiles/issues' if respond_to?(:issues_url) | ||
|
||
# If you upload to Supermarket you should set this so your cookbook | ||
# gets a `View Source` link | ||
# source_url 'https://github.com/<insert_org_here>/test-profiles' if respond_to?(:source_url) | ||
|
||
depends 'audit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# Cookbook Name:: test-profiles | ||
# Recipe:: default | ||
# | ||
# Copyright (c) 2016 The Authors, All Rights Reserved. | ||
|
||
# package 'git' | ||
|
||
include_recipe 'audit::upload' |