通过 Apt 模块使用 puppet 在 Ubuntu 上安装 spotify-client [英] Install spotify-client on Ubuntu using puppet via Apt module
问题描述
使用 puppet 的 Apt 模块在 Ubuntu 上安装 spotify-client 需要什么 puppet 代码?
<块引用>添加 Spotify 存储库签名密钥以验证下载的包
sudo apt-key adv --keyserverhkp://keyserver.ubuntu.com:80 --recv-keysBBEBDCB318AD50EC6865090613B00F1FD2C19886
添加 Spotify 存储库
echo deb http://repository.spotify.com stable non-free |须藤三通/etc/apt/sources.list.d/spotify.list
更新可用包列表
sudo apt-get update
安装 Spotify
sudo apt-get install spotify-client
要添加存储库(步骤 1),Puppet 的 Apt 模块 说要这样做:
apt::key { 'spotify':id =>'BBEBDCB318AD50EC6865090613B00F1FD2C19886',服务器 =>'hkp://keyserver.ubuntu.com:80',}
但是,我不确定如何执行第 2 步并添加存储库.我该如何翻译:echo deb http://repository.spotify.com stable non-free |sudo tee/etc/apt/sources.list.d/spotify.list
使用 Apt 进入我的 puppet manifest?
您实际上可以使用 apt 模块来创建 apt 源文件,而不必将它们作为文件手动管理.
这样的事情应该可以工作:
apt::key { 'spotify':id =>'BBEBDCB318AD50EC6865090613B00F1FD2C19886',服务器 =>'hkp://keyserver.ubuntu.com:80',}->apt::source {'spotify':位置 =>"http://repository.spotify.com",发布 =>稳定的",回购 =>非免费",}->包{'spotify-client':确保 =>"已安装",}
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",
}
这篇关于通过 Apt 模块使用 puppet 在 Ubuntu 上安装 spotify-client的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!