Install spotify-client on Ubuntu using puppet via Apt module

柔情痞子 提交于 2019-12-13 06:47:54

问题


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

The spotify installation instructions are:

  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

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

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?


回答1:


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



回答2:


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. Add this line to your /etc/apt/sources.list file:

deb http://security.debian.org/debian-security wheezy/updates main

4.Run

sudo apt-get update

5.- Run

apt-get install libssl1.0.0

6.- Run

sudo apt-get install spotify-client



来源:https://stackoverflow.com/questions/42497893/install-spotify-client-on-ubuntu-using-puppet-via-apt-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!