Skip to content

Commit

Permalink
Remove apt-transport-https package install (DataDog#504)
Browse files Browse the repository at this point in the history
* removing noisy unnecessary exec

* Requiring minimum version 4.4.0 (when apt-transport-https is installed)
  • Loading branch information
fr3nd authored and truthbk committed Mar 22, 2019
1 parent 1a362c5 commit 5beae76
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
6 changes: 2 additions & 4 deletions manifests/ubuntu/agent5.pp
Expand Up @@ -25,8 +25,6 @@
Optional[String] $apt_keyserver = undef,
) inherits datadog_agent::params{

ensure_packages(['apt-transport-https'])

if !$skip_apt_key_trusting {
::datadog_agent::ubuntu::install_key { [$apt_key]:
server => $apt_keyserver,
Expand Down Expand Up @@ -67,8 +65,8 @@
location => $location,
release => $release,
repos => $repos,
require => Package['apt-transport-https'],
notify => [Exec['datadog_apt-get_remove_agent6'],Exec['apt_update']],
require => Class['apt'],
notify => Exec['datadog_apt-get_remove_agent6'],
}

package { 'datadog-agent-base':
Expand Down
4 changes: 1 addition & 3 deletions manifests/ubuntu/agent6.pp
Expand Up @@ -16,7 +16,6 @@
Optional[String] $apt_keyserver = undef,
) inherits datadog_agent::params {

ensure_packages(['apt-transport-https'])
if !$skip_apt_key_trusting {
::datadog_agent::ubuntu::install_key { [$apt_key]:
server => $apt_keyserver,
Expand All @@ -33,8 +32,7 @@
location => $location,
release => $release,
repos => $repos,
require => Package['apt-transport-https'],
notify => Exec['apt_update'],
require => Class['apt'],
}

package { 'datadog-agent-base':
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Expand Up @@ -59,7 +59,7 @@
},
{
"name": "puppetlabs/apt",
"version_requirement": ">=2.4.0 <5.0.0"
"version_requirement": ">=4.4.0 <5.0.0"
},
{
"name": "puppetlabs/puppetserver_gem",
Expand Down
8 changes: 0 additions & 8 deletions spec/classes/datadog_agent_ubuntu_spec.rb
Expand Up @@ -37,10 +37,6 @@
it { should contain_exec('apt_update') }

# it should install the packages
it do
should contain_package('apt-transport-https')\
.that_comes_before('file[/etc/apt/sources.list.d/datadog.list]')
end
it do
should contain_package('datadog-agent-base')\
.with_ensure('absent')\
Expand Down Expand Up @@ -101,10 +97,6 @@
it { should contain_exec('apt_update') }

# it should install the packages
it do
should contain_package('apt-transport-https')\
.that_comes_before('file[/etc/apt/sources.list.d/datadog6.list]')
end
it do
should contain_package('datadog-agent-base')\
.with_ensure('absent')\
Expand Down

0 comments on commit 5beae76

Please sign in to comment.