Itamae provisioning for FreeBSD

Embed Size (px)

Citation preview

FreeBSD

ItamaeFreeBSD

2016125

FreeBSD

/etc/rc.conf

~/.profile ~/.cshrc

Chef ( https://learn.chef.io/ )

Ansible ( http://www.ansible.com/ )

Puppet ( https://puppetlabs.com/)

Itamae ( https://github.com/itamae-kitchen/itamae/wiki)

ChefRubyDSL

AnsiblePythonYAML

PuppetRuby

ItamaeRubyDSL

Itamae

DSL

http://itamae.connpass.com/event/22857/

Itamae

ruby21

ruby21-gems

rubygem-bundlerItamae bundler

ssh

pkg

sudo (root)

Gemfile

Gemfile

source 'https://rubygems.org'gem 'itamae'gem 'rake'gem 'serverspec'

bundle install path vendor/bundle

Recipe

recipe.rb

%w(lv ja-nkf emacs24 git subversion).each do |pkg| package pkgend

bundle exec itamae ssh -h -u recipe.rb

Itamae

tanaka

user 'tanaka' do uid 1010 gid 20 username "tanaka" password '$5$Ke35...' home '/home/tanaka'end

/etc/rc.conf

file '/etc/rc.conf' do action :edit line='ntpd_enabe=YES' block do |content| if (not content.include?(line)) then content