通过 Apt 模块使用 puppet 在 Ubuntu 上安装 spotify-client

Install spotify-client on Ubuntu using puppet via Apt module

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

spotify installation instructions是:

  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

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

  3. Update list of available packages sudo apt-get update

  4. Install Spotify sudo apt-get install spotify-client

要添加存储库(第 1 步),Puppet's Apt module 说要这样做:

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 翻译成我的人偶清单?

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

像这样的东西应该可以工作:

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",
}

1.添加 Spotify 存储库签名密钥以便能够验证下载的包

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886

2。添加 Spotify 存储库

echo deb http://repository.spotify.com 稳定非免费 | sudo tee /etc/apt/sources.list.d/spotify.list

3。将此行添加到您的 /etc/apt/sources.list 文件中:

deb http://security.debian.org/debian-security wheezy/updates 主要

4.Run

sudo apt-get 更新

5.- 运行

apt-get 安装 libssl1.0.0

6.- 运行

sudo apt-get install spotify-client