serverspec と対象 OS についての覚え書き
2013-05-05 現在、serverspec の Auto Detect が対応しているのは以下の OS。
- RedHat
- Amazon Linux 含む
--- plugins-scripts/check_log.sh.dist 2016-09-13 16:24:39.057127354 +0900 | |
+++ plugins-scripts/check_log.sh 2016-09-13 16:25:22.990439291 +0900 | |
@@ -202,13 +202,13 @@ | |
chmod 600 $tempdiff | |
fi | |
-diff $logfile $oldlog | grep -v "^>" > $tempdiff | |
+diff $logfile $oldlog | egrep -v "^>" > $tempdiff | |
# Count the number of matching log entries we have |
package main | |
import ( | |
"fmt" | |
"os" | |
"os/exec" | |
"regexp" | |
"strconv" | |
"strings" | |
"time" |
#!/usr/bin/ruby | |
require 'json' | |
require 'excon' | |
require 'pp' | |
SOCKET_PATH = '/system/volatile/rad/radsocket-http' | |
connection = Excon.new('unix:///', socket: SOCKET_PATH) |
$ git diff | |
diff --git a/src/Makefile b/src/Makefile | |
index 1d03c78..5f822bf 100644 | |
--- a/src/Makefile | |
+++ b/src/Makefile | |
@@ -12,6 +12,11 @@ TARGET:=$(TARGET).exe | |
LIBS += -lws2_32 | |
endif | |
+UNAME_S := $(shell uname -s) |
# -*- coding: utf-8 -*- | |
=begin | |
とある技術ブログを読んで、いろいろと気になったので書いてみた | |
properties はこんな感じ。 | |
:mysql: | |
:version: 5.6 | |
:config: | |
:groups: |
--- lib/puppet/provider/user/user_role_add.rb.bak 2014-05-29 23:37:58.360650493 +0900 | |
+++ lib/puppet/provider/user/user_role_add.rb 2014-05-29 23:38:51.887938708 +0900 | |
@@ -17,6 +17,7 @@ | |
options :profiles, :flag => "-P" | |
options :password_min_age, :flag => "-n" | |
options :password_max_age, :flag => "-x" | |
+ options :shell, :flag => "-s" | |
verify :gid, "GID must be an integer" do |value| | |
value.is_a? Integer |
serverspec への matcher の追加方法に関する覚書。
serverspec のディレクトリ構成は以下のようになっています。
serverspec
├── bin
class ukigumo::server { | |
package { | |
[ | |
'pkg:/library/perl-5/amon2-512', | |
'pkg:/library/perl-5/text-xslate-512', | |
'pkg:/library/perl-5/text-xslate-bridge-tt2like-512', | |
'pkg:/library/perl-5/plack-middleware-reverseproxy-512', | |
'pkg:/library/perl-5/time-piece-512', | |
'pkg:/library/perl-5/sql-interp-512', |
#!/usr/bin/python | |
# python-munin (http://samuelks.com/python-munin/) を使って、 | |
# cpu 使用率の plugin を書いてみた | |
import commands | |
from munin import MuninPlugin | |
class CPUPlugin(MuninPlugin): | |
title = "cpu usage (test)" |