Commit 026aa9c8 authored by Tim Smith's avatar Tim Smith Committed by GitHub
Browse files

Merge pull request #66 from tas50/upstreammaster

Further testing updates
parents 49c9effa cf312e07
settings:
parallel: true
driver:
name: docker
# privileged is required otherwise the container doesn't boot right
privileged: true
name: dokken
chef_version: latest
privileged: true # because Docker and SystemD/Upstart
transport:
name: dokken
provisioner:
name: dokken
verifier:
name: inspec
format: doc
platforms:
- name: debian-7
driver:
image: debian:7
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install lsb-release -y
- name: debian-8
driver:
image: debian:8
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get install lsb-release -y
- name: centos-5
driver:
image: centos:5
platform: rhel
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum install -y which initscripts
- name: centos-6
driver:
image: centos:6
platform: rhel
run_command: /sbin/init
provision_command:
- /usr/bin/yum install -y initscripts net-tools wget
pid_one_command: /sbin/init
intermediate_instructions:
- RUN yum -y install which initscripts
- name: centos-7
driver:
image: centos:7
platform: rhel
run_command: /usr/lib/systemd/systemd
provision_command:
- /bin/yum install -y initscripts net-tools wget
- name: debian-7
driver:
image: debian:7
platform: debian
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
- name: debian-8
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install lsof which
- name: fedora-23
driver:
image: debian:8
platform: debian
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
image: fedora:23
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN dnf -y install yum which
- name: ubuntu-12.04
driver:
image: ubuntu-upstart:12.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: ubuntu-14.04
driver:
image: ubuntu-upstart:14.04
platform: ubuntu
disable_upstart: false
run_command: /sbin/init
provision_command:
- /usr/bin/apt-get update
- /usr/bin/apt-get install apt-transport-https net-tools -y
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: ubuntu-16.04
driver:
image: ubuntu:16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- name: opensuse-13.2
driver:
image: opensuse:13.2
pid_one_command: /bin/systemd
suites:
- name: client
......
......@@ -6,23 +6,24 @@ provisioner:
verifier:
name: inspec
format: doc
platforms:
- name: centos-5.11
- name: centos-6.7
- name: centos-7.2
- name: debian-7.9
- name: debian-7.10
run_list: apt::default
- name: debian-8.2
- name: debian-8.4
run_list: apt::default
- name: fedora-22
run_list: yum::dnf_yum_compat
- name: fedora-23
run_list: yum::dnf_yum_compat
- name: ubuntu-12.04
run_list: apt::default
- name: ubuntu-14.04
run_list: apt::default
- name: ubuntu-16.04
run_list: apt::default
suites:
- name: client
......
AllCops:
Exclude:
- vendor/**/*
- Guardfile
AlignParameters:
Enabled: false
ClassLength:
Enabled: false
CyclomaticComplexity:
Enabled: false
Documentation:
Enabled: false
Encoding:
Enabled: false
Style/FileName:
Enabled: false
Style/Alias:
Enabled: false
Style/SpaceBeforeFirstArg:
Enabled: false
LineLength:
Enabled: false
MethodLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/ModuleLength:
Enabled: false
PerceivedComplexity:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
sudo: required
dist: trusty
# install the pre-release chef-dk. Use chef-stable-precise to install the stable release
addons:
......@@ -8,30 +9,33 @@ addons:
packages:
- chefdk
branches:
only:
- master
services: docker
env:
matrix:
- INSTANCE=default-ubuntu-1204
- INSTANCE=default-ubuntu-1404
- INSTANCE=default-ubuntu-1604
- INSTANCE=default-centos-6
- INSTANCE=default-centos-7
- INSTANCE=default-debian-7
- INSTANCE=default-debian-8
# Don't `bundle install`
install: echo "skip bundle install"
fast_finish: true
# Ensure we make ChefDK's Ruby the default
before_script:
# https://github.com/zuazo/kitchen-in-travis-native/issues/1#issuecomment-142230889
- sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
- /opt/chefdk/embedded/bin/chef gem install kitchen-docker
- /opt/chefdk/embedded/bin/chef gem install kitchen-dokken
script:
- /opt/chefdk/embedded/bin/chef --version
- /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/cookstyle --version
- /opt/chefdk/embedded/bin/cookstyle
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
- /opt/chefdk/embedded/bin/rspec
......
source 'https://rubygems.org'
group :lint do
gem 'foodcritic', '~> 6.0'
gem 'rubocop', '~> 0.38'
end
group :unit do
gem 'berkshelf', '~> 4.3'
gem 'chefspec', '~> 4.6'
end
group :kitchen_common do
gem 'test-kitchen', '~> 1.6'
end
group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.19'
end
group :kitchen_inspec do
gem 'kitchen-inspec'
end
gem 'berkshelf', '~> 4.3'
gem 'chefspec', '~> 4.6'
gem 'cookstyle'
gem 'foodcritic', '~> 6.2'
gem 'kitchen-dokken'
gem 'kitchen-inspec', '~> 0.12'
gem 'kitchen-vagrant', '~> 0.20'
gem 'rake'
gem 'stove'
gem 'test-kitchen', '~> 1.9'
gem 'tomlrb'
require 'rspec/core/rake_task'
require 'cookstyle'
require 'rubocop/rake_task'
require 'foodcritic'
require 'kitchen'
......
......@@ -2,7 +2,7 @@
# Cookbook Name:: ossec
# Recipe:: common
#
# Copyright 2010, Opscode, Inc.
# Copyright 2010-2016, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
......@@ -17,9 +17,9 @@
# limitations under the License.
#
ruby_block 'ossec install_type' do
ruby_block 'ossec install_type' do # ~FC014
block do
if node.recipes.include?('ossec::default')
if node['recipes'].include?('ossec::default')
type = 'local'
else
type = nil
......@@ -87,7 +87,7 @@ end
# client.keys file will cause a server not to listen and an agent to
# abort immediately. Explicitly stopping the service here after
# installation allows Chef to start it when client.keys has content.
service 'stop ossec' do
service 'stop ossec' do # ~FC037
service_name platform_family?('debian') ? 'ossec' : 'ossec-hids'
action :nothing
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment