chef apt_repository 包括 xenial 组件

chef apt_repository includes xenial components

apt_repository 'datastax.sources' do
    uri         'https://**********************'
    components  ['stable','main']
    key     'https://*******************'
end

在使用 chef 添加存储库以安装 datastax Cassandra 时,我在存储库中获得了一个额外的 xenial 组件。

如果我手动操作,即在终端中,我可以在没有 xenial 的情况下得到它

我的客户端机器是ubuntu16.04

为什么我会得到这个组件以及如何避免它?

distribution 参数设置为空字符串。这默认为 node['lsb']['codename']:

apt_repository 'datastax.sources' do
  uri          'https://**********************'
  components   ['stable','main']
  key          'https://*******************'
  distribution ''
end