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
//usr/bin/env go run $0 $@ ; exit |
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
when: animal == 'dog' or animal == 'cat' |
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
import ansible.runner | |
runner = ansible.runner.Runner( | |
module_name='モジュール名', | |
module_args='モジュールに渡す引数', | |
pattern='グループ名のパターン(ワイルドカードは*)', | |
forks=並列数 | |
) | |
datastructure = runner.run() |
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
control_path = %(directory)s/%%h-%%r |
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
# rbenv + ruby-buildインストール | |
cd ~ | |
git clone git@github.com:sstephenson/rbenv.git ~/.rbenv | |
git clone git@github.com:sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
. ~/.bash_profile | |
# rbenvで ruby 2.0.0-p353 を入れる | |
VERSION=2.0.0-p353 |
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
require 'rake' | |
require 'rspec/core/rake_task' | |
require 'yaml' | |
properties = YAML.load_file('properties.yml') | |
desc "Run serverspec to all hosts" | |
task :serverspec => 'serverspec:all' | |
namespace :serverspec do |
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
describe cgroup('group1') do | |
its('cpuset.cpus') { should eq 1 } | |
end |
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
spec/target.example.jp/http_spec.rb |
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
gem 'serverspec' |
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
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Admin extends CI_Controller{ | |
public function index($table_name){ | |
$this->load->library('grocery_CRUD'); | |
$this->grocery_crud->set_table($table_name); | |
$this->load->view('example.php', $this->grocery_crud->render()); | |
} | |
} |