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
RSpec.configure do |c| | |
# 以下を追加 | |
c.path = '/sbin:/usr/sbin' | |
if ENV['ASK_SUDO_PASSWORD'] | |
require 'highline/import' | |
c.sudo_password = ask("Enter sudo password: ") { |q| q.echo = false } | |
else |
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
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin | |
jenkins ALL=(ALL) NOPASSWD:ALL |
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 'spec_helper' | |
describe package('mysql-server') do | |
it { should be_installed } | |
end | |
describe service('mysqld') do | |
it { should be_enabled } | |
it { should be_running } | |
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
sudo cp serverspec /var/lib/jenkins/workspace/ |
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
/var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in `load': cannot load such file -- /var/lib/gems/1.9.1/gems/knife-xapi-0.5.3/lib/chef/knife/xapi_vdi_create.rb (LoadError) | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in `block in load_commands' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in `each' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife/core/subcommand_loader.rb:37:in `load_commands' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife.rb:119:in `load_commands' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/knife.rb:139:in `list_commands' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/knife.rb:179:in `print_help_and_exit' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/knife.rb:143:in `validate_and_parse_options' | |
from /var/lib/gems/1.9.1/gems/chef-11.4.4/lib/chef/application/kn |
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
$ ls -l /var/lib/gems/1.9.1/gems/knife-xapi-0.5.3/lib/chef/knife/ | |
合計 80 | |
-rw-r--r-- 1 root root 16069 6月 9 23:47 xapi_base.rb | |
-rw-r--r-- 1 root root 15224 6月 9 23:47 xapi_guest_create.rb | |
-rw-r----- 1 root root 3313 6月 9 23:47 xapi_guest_delete.rb | |
-rw-r----- 1 root root 1960 6月 9 23:47 xapi_guest_list.rb | |
-rw-r----- 1 root root 1179 6月 9 23:47 xapi_guest_start.rb | |
-rw-r----- 1 root root 1181 6月 9 23:47 xapi_guest_stop.rb | |
-rw-r--r-- 1 root root 1281 6月 9 23:47 xapi_network_list.rb | |
-rw-r----- 1 root root 2750 6月 9 23:47 xapi_vdi_attach.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
$ knife xenserver vm create --help |egrep -i 'chef|recipe|recipes' | |
--bootstrap-version VERSION The version of Chef to install | |
--node-name NAME The Chef node name for your new node | |
-s, --server-url URL Chef Server URL | |
-E, --environment ENVIRONMENT Set the Chef environment | |
-r, --run-list RUN_LIST Comma separated list of roles/recipes to apply | |
-v, --version Show chef version |
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
kappa@x1carbon:~/git/forks/knife-xapi/lib/xenapi$ knife xapi guest create --help |egrep -i 'chef|recipe|recipes' | |
--bootstrap-version VERSION The version of Chef to install | |
-N, --node-name NAME The Chef node name for your new node | |
-s, --server-url URL Chef Server URL | |
-E, --environment ENVIRONMENT Set the Chef environment | |
-j JSON_ATTRIBS, A JSON string to be added to the first run of chef-client | |
-r, --run-list RUN_LIST Comma separated list of roles/recipes to apply | |
-v, --version Show chef version |
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 'yaml' | |
attributes = YAML.load_file('attributes.yml') | |
desc "Run serverspec to all hosts" | |
task :serverspec => 'serverspec:all' |
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
10.0.0.12: | |
:ip: 10.0.0.12 | |
:host_name: webapp01 | |
10.0.0.13: | |
:ip: 10.0.0.13 | |
:host_name: webapp02 | |
10.0.0.14: | |
:ip: 10.0.0.14 | |
:host_name: db01 | |
10.0.0.15: |
OlderNewer