Style/SpaceBeforeFirstArg:
Enabled: false
Style/TrailingCommaInLiteral:
- EnforcedStyleForMultiline: comma
+ EnforcedStyleForMultiline: consistent_comma
Style/WordArray:
Enabled: false
# samba-grid CHANGELOG
+0.1.2
+-----
+- adds the Debian 9 (stretch) support.
+- adds the Concourse pipeline configuration.
+
0.1.1
-----
- adds the `samba-grid::smbldap-tools` recipe.
source 'https://rubygems.org'
-#gem 'foodcritic'
+# with Chef DK
+gem 'stove'
- Author:: whitestar at osdn.jp
```text
-Copyright 2016, whitestar
+Copyright 2016-2017, whitestar
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
require 'rspec/core/rake_task'
require 'rubocop/rake_task'
require 'foodcritic'
+require 'stove/rake_task'
namespace :style do
desc 'Run Ruby style checks'
- RuboCop::RakeTask.new(:ruby)
+ RuboCop::RakeTask.new(:ruby) do |t|
+ t.options = [
+ '--auto-gen-config', # creates .rubocop_todo.yml
+ ]
+ end
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)
+desc 'Publish cookbook'
+Stove::RakeTask.new(:publish) do |t|
+ t.stove_opts = [
+ # `--username` and `--key` are set in ~/.stove typically.
+ #'--username', 'somebody',
+ #'--key', '~/chef/chef.io.example.com/somebody.pem',
+ #'--endpoint', 'https://supermarket.io.example.com/api/v1', # default: supermarket.chef.io
+ #'--no-ssl-verify',
+ '--no-git',
+ '--log-level', 'info',
+ ]
+end
+
task default: ['style', 'spec']
--- /dev/null
+---
+# $ fly -t target sp -p samba-grid-cookbook -c concourse.yml -l fly-vars.yml -l ~/credentials.yml
+resources:
+- name: src-git
+ type: git
+ source:
+ uri: git://git.osdn.net/gitroot/metasearch/grid-chef-repo.git
+ branch: master
+ paths:
+ - cookbooks/((cookbook-name))
+- name: chefdk-cache
+ type: docker-image
+ source:
+ repository: chef/chefdk
+ tag: ((chefdk-version))
+ # ((param)) style: fly >= 3.2.0
+ registry_mirror: https://((registry-mirror-domain)) # e.g. https://registry.docker.example.com:5000
+ ca_certs:
+ - domain: ((registry-mirror-domain)) # e.g. registry.docker.example.com:5000
+ cert: ((docker-reg-ca-cert))
+
+jobs:
+- name: build-cookbook
+ plan:
+ - get: src-git
+ trigger: true
+ - get: chefdk-cache
+ - task: ci-build
+ image: chefdk-cache
+ config:
+ platform: linux
+
+ #image_resource:
+ # type: docker-image
+ # source:
+ # repository: chef/chefdk
+ # tag: ((chefdk-version))
+ # NG, setting disable
+ #registry_mirror: https://((registry-mirror-domain))
+ #ca_certs:
+ #- domain: ((registry-mirror-domain))
+ # cert: ((docker-reg-ca-cert))
+
+ inputs:
+ - name: src-git
+
+ run:
+ #dir: ./src-git/cookbooks/((cookbook-name))
+ #path: rake
+ path: /bin/bash
+ args:
+ - -c
+ - |
+ cd ./src-git/cookbooks/((cookbook-name))
+ bundle install
+ rake
--- /dev/null
+---
+cookbook-name: samba-grid
+chefdk-version: 0.17.17
license 'Apache 2.0'
description 'Installs/Configures Samba'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.1.1'
+version '0.1.2'
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
# Cookbook Name:: samba-grid
# Recipe:: server
#
-# Copyright 2016, whitestar
+# Copyright 2016-2017, whitestar
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# limitations under the License.
#
+platform = node['platform']
+platform_version = node['platform_version']
+
%w(
samba
smbclient
'nmbd',
'smbd',
]
-services.push('samba-ad-dc') if node['platform'] == 'debian'
+services.push('samba-ad-dc') if platform == 'debian' && platform_version < '9.0'
#'samba-ad-dc', # masked on latest Ubuntu.
#'samba', # masked on latest Debian and Ubuntu.
mode '0644'
notifies :reload, 'service[nmbd]'
notifies :reload, 'service[smbd]'
- notifies :reload, 'service[samba-ad-dc]' if node['platform'] == 'debian'
+ notifies :reload, 'service[samba-ad-dc]' if platform == 'debian' && platform_version < '9.0'
#notifies :reload, 'service[samba]'
end