Upgrade to Pro — share decks privately, control downloads, hide ads and more …

環境構築を自動化したい@wakayama.rb#32 / automatival enviro...

環境構築を自動化したい@wakayama.rb#32 / automatival environment building @wakayama.rb#32

wakayama.rb#32で話題提供やデモンストレーションを行った、Ansible、Serverspec、Travis CIについてのスライドです。

KamataRyo

April 10, 2016
Tweet

More Decks by KamataRyo

Other Decks in Programming

Transcript

  1. "OTJCMFQMBZCPPLͷྫ # playbook.yml # CentOSͷྫ --- - name: playbookͷྫ hosts:

    wakayamarb.org:22 remote_user: kamata become: yes tasks: - name: add a user user: name=user password=pass - name: install apache yum: name=hatted - name: enable apache service: name=httpd state=started enabled=yes
  2. 4QFDϑΝΠϧͷྫ # server_spec.rb # kamataϢʔβ͕ଘࡏ͢Δ describe user('kamata') do it {

    should exist } end # ඞཁͳaptύοέʔδ͕Πϯετʔϧ͞Ε͍ͯΔ apt_packages = %w{ ufw apache2 postgresql-server } apt_packages.each do |pkg| describe package(pkg) do it { should be_installed.by('apt') } end end