Sha256: f91a191693e229a5b0b5cd8fb3d1565255a5d5c85c1386013a59f285e57977bd

Contents?: true

Size: 1.2 KB

Versions: 43

Compression:

Stored size: 1.2 KB

Contents

module Incline
  class CLI
    class Prepare
      
      private
      
      def install_passenger(shell)
        distros = {
            '12.04' => 'precise',
            '12.10' => 'quantal',
            '13.04' => 'raring',
            '13.10' => 'saucy',
            '14.04' => 'trusty',
            '14.10' => 'utopic',
            '15.04' => 'vivid',
            '15.10' => 'wily',
            '16.04' => 'xenial',
            '16.10' => 'yakkety',
            '17.04' => 'zesty'
        }

        distro = distros[host_info['VERSION_ID']]
        shell.with_stat('Installing Phusion Passenger') do
          shell.sudo_exec 'apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7'
          shell.apt_get 'install apt-transport-https ca-certificates'
          shell.sudo_exec "echo deb https://oss-binaries.phusionpassenger.com/apt/passenger #{distro} main > /etc/apt/sources.list.d/passenger.list"
          shell.apt_get 'update'
          shell.apt_get 'install nginx-extras passenger'
          shell.sudo_exec_ignore_code 'systemctl stop nginx'
          shell.sudo_exec 'systemctl start nginx'
          shell.sudo_exec 'systemctl enable nginx'
        end
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
incline-0.3.14 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.13 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.12 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.11 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.10 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.9 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.8 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.7 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.6 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.5 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.4 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.3 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.2 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.1 lib/incline/cli/prepare/install_passenger.rb
incline-0.3.0 lib/incline/cli/prepare/install_passenger.rb
incline-0.2.36 lib/incline/cli/prepare/install_passenger.rb
incline-0.2.35 lib/incline/cli/prepare/install_passenger.rb
incline-0.2.34 lib/incline/cli/prepare/install_passenger.rb
incline-0.2.28 lib/incline/cli/prepare/install_passenger.rb
incline-0.2.27 lib/incline/cli/prepare/install_passenger.rb