lib/vanagon/platform/deb.rb
# Returns the string to add a target repo to the platforms' provisioning
#
# @param definition [URI] A URI to a deb or list file
# @return [String] The command to add the repo target to the system
Returns the string to add a target repo to the platforms' provisioning
Returns the string to add a target repo to the platforms ' provisioning
def add_repo_target(definition)
        if File.extname(definition.path) == '.deb'
          "curl -o local.deb '#{definition}' && dpkg -i local.deb; rm -f local.deb"
        else
          reponame = "#{SecureRandom.hex}-#{File.basename(definition.path)}"
          reponame = "#{reponame}.list" if File.extname(reponame) != '.list'
          "curl -o '/etc/apt/sources.list.d/#{reponame}' '#{definition}'"
        end
      end
def add_repo_target ( definition ) if File . extname ( definition . path ) == '.deb' "curl -o local.deb '#{definition}' && dpkg -i local.deb; rm -f local.deb" else reponame = "#{SecureRandom.hex}-#{File.basename(definition.path)}" reponame = "#{reponame}.list" if File . extname ( reponame ) != '.list' "curl -o '/etc/apt/sources.list.d/#{reponame}' '#{definition}'" end end
Returns the string to add a target repo to the platforms' provisioning
Returns the string to add a target repo to the platforms ' provisioning
# repo definition is an deb (like puppetlabs-release)
The command to add the repo target to the system
The command to add the repo target to the system
String
definition
A URI to a deb or list file
A URI to a deb or list file