Add generated cookbook content
This commit is contained in:
commit
b817912ea0
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.vagrant
|
||||||
|
*~
|
||||||
|
*#
|
||||||
|
.#*
|
||||||
|
\#*#
|
||||||
|
.*.sw[a-z]
|
||||||
|
*.un~
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
Gemfile.lock
|
||||||
|
gems.locked
|
||||||
|
bin/*
|
||||||
|
.bundle/*
|
||||||
|
|
||||||
|
# test kitchen
|
||||||
|
.kitchen/
|
||||||
|
.kitchen.local.yml
|
||||||
|
|
||||||
|
# Chef
|
||||||
|
Berksfile.lock
|
||||||
|
.zero-knife.rb
|
||||||
|
Policyfile.lock.json
|
26
.kitchen.yml
Normal file
26
.kitchen.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: vagrant
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
name: chef_zero
|
||||||
|
# You may wish to disable always updating cookbooks in CI or other testing environments.
|
||||||
|
# For example:
|
||||||
|
# always_update_cookbooks: <%= !ENV['CI'] %>
|
||||||
|
always_update_cookbooks: true
|
||||||
|
|
||||||
|
verifier:
|
||||||
|
name: inspec
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: ubuntu-16.04
|
||||||
|
- name: centos-7
|
||||||
|
|
||||||
|
suites:
|
||||||
|
- name: default
|
||||||
|
run_list:
|
||||||
|
- recipe[t42-common::default]
|
||||||
|
verifier:
|
||||||
|
inspec_tests:
|
||||||
|
- test/integration/default
|
||||||
|
attributes:
|
4
Berksfile
Normal file
4
Berksfile
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
source 'https://supermarket.chef.io'
|
||||||
|
|
||||||
|
metadata
|
11
CHANGELOG.md
Normal file
11
CHANGELOG.md
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# t42-common CHANGELOG
|
||||||
|
|
||||||
|
This file is used to list changes made in each version of the t42-common cookbook.
|
||||||
|
|
||||||
|
# 0.1.0
|
||||||
|
|
||||||
|
Initial release.
|
||||||
|
|
||||||
|
- change 0
|
||||||
|
- change 1
|
||||||
|
|
3
LICENSE
Normal file
3
LICENSE
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Copyright 2019 The Authors
|
||||||
|
|
||||||
|
All rights reserved, do not redistribute.
|
4
README.md
Normal file
4
README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# t42-common
|
||||||
|
|
||||||
|
TODO: Enter the cookbook description here.
|
||||||
|
|
104
chefignore
Normal file
104
chefignore
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
# Put files/directories that should be ignored in this file when uploading
|
||||||
|
# to a chef-server or supermarket.
|
||||||
|
# Lines that start with '# ' are comments.
|
||||||
|
|
||||||
|
# OS generated files #
|
||||||
|
######################
|
||||||
|
.DS_Store
|
||||||
|
Icon?
|
||||||
|
nohup.out
|
||||||
|
ehthumbs.db
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# SASS #
|
||||||
|
########
|
||||||
|
.sass-cache
|
||||||
|
|
||||||
|
# EDITORS #
|
||||||
|
###########
|
||||||
|
\#*
|
||||||
|
.#*
|
||||||
|
*~
|
||||||
|
*.sw[a-z]
|
||||||
|
*.bak
|
||||||
|
REVISION
|
||||||
|
TAGS*
|
||||||
|
tmtags
|
||||||
|
*_flymake.*
|
||||||
|
*_flymake
|
||||||
|
*.tmproj
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
mkmf.log
|
||||||
|
|
||||||
|
## COMPILED ##
|
||||||
|
##############
|
||||||
|
a.out
|
||||||
|
*.o
|
||||||
|
*.pyc
|
||||||
|
*.so
|
||||||
|
*.com
|
||||||
|
*.class
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*/rdoc/
|
||||||
|
|
||||||
|
# Testing #
|
||||||
|
###########
|
||||||
|
.watchr
|
||||||
|
.rspec
|
||||||
|
spec/*
|
||||||
|
spec/fixtures/*
|
||||||
|
test/*
|
||||||
|
features/*
|
||||||
|
examples/*
|
||||||
|
Guardfile
|
||||||
|
Procfile
|
||||||
|
.kitchen*
|
||||||
|
kitchen.yml*
|
||||||
|
.rubocop.yml
|
||||||
|
spec/*
|
||||||
|
Rakefile
|
||||||
|
.travis.yml
|
||||||
|
.foodcritic
|
||||||
|
.codeclimate.yml
|
||||||
|
|
||||||
|
# SCM #
|
||||||
|
#######
|
||||||
|
.git
|
||||||
|
*/.git
|
||||||
|
.gitignore
|
||||||
|
.gitmodules
|
||||||
|
.gitconfig
|
||||||
|
.gitattributes
|
||||||
|
.svn
|
||||||
|
*/.bzr/*
|
||||||
|
*/.hg/*
|
||||||
|
*/.svn/*
|
||||||
|
|
||||||
|
# Berkshelf #
|
||||||
|
#############
|
||||||
|
Berksfile
|
||||||
|
Berksfile.lock
|
||||||
|
cookbooks/*
|
||||||
|
tmp
|
||||||
|
|
||||||
|
# Bundler #
|
||||||
|
###########
|
||||||
|
vendor/*
|
||||||
|
|
||||||
|
# Policyfile #
|
||||||
|
##############
|
||||||
|
Policyfile.rb
|
||||||
|
Policyfile.lock.json
|
||||||
|
|
||||||
|
# Cookbooks #
|
||||||
|
#############
|
||||||
|
CONTRIBUTING*
|
||||||
|
CHANGELOG*
|
||||||
|
TESTING*
|
||||||
|
|
||||||
|
# Vagrant #
|
||||||
|
###########
|
||||||
|
.vagrant
|
||||||
|
Vagrantfile
|
20
metadata.rb
Normal file
20
metadata.rb
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name 't42-common'
|
||||||
|
maintainer 'The Authors'
|
||||||
|
maintainer_email 'you@example.com'
|
||||||
|
license 'All Rights Reserved'
|
||||||
|
description 'Installs/Configures t42-common'
|
||||||
|
long_description 'Installs/Configures t42-common'
|
||||||
|
version '0.1.0'
|
||||||
|
chef_version '>= 13.0'
|
||||||
|
|
||||||
|
# The `issues_url` points to the location where issues for this cookbook are
|
||||||
|
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
||||||
|
# uploaded to a Supermarket.
|
||||||
|
#
|
||||||
|
# issues_url 'https://github.com/<insert_org_here>/t42-common/issues'
|
||||||
|
|
||||||
|
# The `source_url` points to the development repository for this cookbook. A
|
||||||
|
# `View Source` link will be displayed on this cookbook's page when uploaded to
|
||||||
|
# a Supermarket.
|
||||||
|
#
|
||||||
|
# source_url 'https://github.com/<insert_org_here>/t42-common'
|
5
recipes/default.rb
Normal file
5
recipes/default.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#
|
||||||
|
# Cookbook:: t42-common
|
||||||
|
# Recipe:: default
|
||||||
|
#
|
||||||
|
# Copyright:: 2019, The Authors, All Rights Reserved.
|
3
spec/spec_helper.rb
Normal file
3
spec/spec_helper.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
require 'chefspec'
|
||||||
|
require 'chefspec/berkshelf'
|
35
spec/unit/recipes/default_spec.rb
Normal file
35
spec/unit/recipes/default_spec.rb
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#
|
||||||
|
# Cookbook:: t42-common
|
||||||
|
# Spec:: default
|
||||||
|
#
|
||||||
|
# Copyright:: 2019, The Authors, All Rights Reserved.
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 't42-common::default' do
|
||||||
|
context 'When all attributes are default, on Ubuntu 16.04' do
|
||||||
|
let(:chef_run) do
|
||||||
|
# for a complete list of available platforms and versions see:
|
||||||
|
# https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
|
||||||
|
runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
|
||||||
|
runner.converge(described_recipe)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'converges successfully' do
|
||||||
|
expect { chef_run }.to_not raise_error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'When all attributes are default, on CentOS 7.4.1708' do
|
||||||
|
let(:chef_run) do
|
||||||
|
# for a complete list of available platforms and versions see:
|
||||||
|
# https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
|
||||||
|
runner = ChefSpec::ServerRunner.new(platform: 'centos', version: '7.4.1708')
|
||||||
|
runner.converge(described_recipe)
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'converges successfully' do
|
||||||
|
expect { chef_run }.to_not raise_error
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
16
test/integration/default/default_test.rb
Normal file
16
test/integration/default/default_test.rb
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# InSpec test for recipe t42-common::default
|
||||||
|
|
||||||
|
# The InSpec reference, with examples and extensive documentation, can be
|
||||||
|
# found at http://inspec.io/docs/reference/resources/
|
||||||
|
|
||||||
|
unless os.windows?
|
||||||
|
# This is an example test, replace with your own test.
|
||||||
|
describe user('root'), :skip do
|
||||||
|
it { should exist }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# This is an example test, replace it with your own test.
|
||||||
|
describe port(80), :skip do
|
||||||
|
it { should_not be_listening }
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user