问题
What puppet code do I need to install the spotify-client on Ubuntu using puppet's Apt module?
The spotify installation instructions are:
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
Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
Update list of available packages
sudo apt-get update
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