Sha256: 6b0adb69a3edeb6bcaa5c140d7a0a3702bb1d49bb5e772fe1b9844b8d3bc6272

Contents?: true

Size: 567 Bytes

Versions: 1

Compression:

Stored size: 567 Bytes

Contents

module DanarchyDeploy
  module System
    class CentOS
      def self.new(deployment, options)
        puts "\n" + self.name
        puts "#{deployment[:os].capitalize} detected! Using yum."
        # needs more testing

        set_hostname(deployment[:hostname]) if !options[:pretend]
        installer = 'yum install -y '
        updater = 'yum upgrade -y'
        cleaner = 'yum clean all'

        [installer, updater, cleaner]
      end

      private
      def set_hostname(hostname)
        `hostnamectl set-hostname #{hostname}`
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
danarchy_deploy-0.2.9 lib/danarchy_deploy/system/centos.rb