本文介绍了通过Apt模块使用p在Ubuntu上安装spotify-client的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用puppet的Apt模块在Ubuntu上安装spotify-client的哪个puppet代码?

What puppet code do I need to install the spotify-client on Ubuntu using puppet's Apt module?

spotify安装说明是:

  1. 添加Spotify存储库签名密钥,以便能够验证下载的软件包 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886

  1. Add the Spotify repository signing key to be able to verify downloaded packages sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886

添加Spotify存储库echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list

Add the Spotify repository echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list

更新可用软件包列表sudo apt-get update

安装Spotify sudo apt-get install spotify-client

Install Spotify sudo apt-get install spotify-client

要添加存储库(第1步), Puppet的Apt模块说要这样做:

To add a repository (Step 1), Puppet's Apt module says to do this:

apt::key { 'spotify':
    id      => 'BBEBDCB318AD50EC6865090613B00F1FD2C19886',
    server  => 'hkp://keyserver.ubuntu.com:80',
}

但是,我不确定如何执行第2步并添加存储库.我该如何使用Apt将echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list转换为我的木偶清单?

However, I'm not sure how to do step 2, and add the repository. How do I translate this: echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list into my puppet manifest using Apt?

推荐答案

您实际上可以使用apt模块来创建apt源文件,而不必将它们作为文件进行手动管理.

You can actually use the apt module to create the apt source files, rather than having to manage them manually as files.

类似的事情应该起作用:

Something like this should work:

apt::key { 'spotify':
  id      => 'BBEBDCB318AD50EC6865090613B00F1FD2C19886',
  server  => 'hkp://keyserver.ubuntu.com:80',
}
->
apt::source {'spotify':
  location => "http://repository.spotify.com",
  release => "stable",
  repos => "non-free",
}
->
package {'spotify-client':
  ensure => "installed",
}

这篇关于通过Apt模块使用p在Ubuntu上安装spotify-client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 06:08