Sha256: 0fe06bd75c826ecbb55e281bafec2c908611fce5db52e07cbbf621a018998b01

Contents?: true

Size: 641 Bytes

Versions: 9

Compression:

Stored size: 641 Bytes

Contents

Runbook.book "Restart Nginx" do
  description <<-DESC
This is a simple runbook to restart nginx and verify
it starts successfully
  DESC

  section "Restart Nginx" do
    server "app01.prod"

    step "Stop Nginx" do
      note "Stopping Nginx..."
      command "service nginx stop"
      assert %q{service nginx status | grep "not running"}
    end

    step { wait 5 }

    step "Start Nginx" do
      note "Starting Nginx..."
      command "service nginx start"
      assert %q{service nginx status | grep "is running"}
      confirm "Nginx is taking traffic?"
      notice "Make sure to report why you restarted nginx"
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
careacademy-runbook-1.2.0 examples/restart_nginx.rb
runbook-1.1.0 examples/restart_nginx.rb
runbook-1.0.0 examples/restart_nginx.rb
runbook-0.16.1 examples/restart_nginx.rb
runbook-0.16.0 examples/restart_nginx.rb
runbook-0.15.0 samples/restart_nginx.rb
runbook-0.14.0 samples/restart_nginx.rb
runbook-0.13.0 samples/restart_nginx.rb
runbook-0.12.1 samples/restart_nginx.rb