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