Skip to content

Commit

Permalink
Merge pull request #20 from datacentred/fix_package_deps
Browse files Browse the repository at this point in the history
Fix broken package deps
  • Loading branch information
yankcrime committed Apr 19, 2016
2 parents a21daef + 204c525 commit 376f73c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ There's a couple of fairly standard dependencies for this module, as follows:
* https://github.com/puppetlabs/puppetlabs-stdlib
* https://github.com/puppetlabs/puppetlabs-apt (on Debian / Ubuntu)

*NB:* On some apt-based distributions you'll need to ensure you have support
for TLS-enabled repos in place. This can be achieved by installing the
`apt-transport-https` package.

### Usage

Telegraf's configuration is split into four main sections - global tags,
Expand Down
2 changes: 0 additions & 2 deletions manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
if $::telegraf::manage_repo {
case $::osfamily {
'Debian': {
ensure_packages(['apt-transport-https'])
apt::source { 'influxdata':
comment => 'Mirror for InfluxData packages',
location => "https://repos.influxdata.com/${_operatingsystem}",
Expand All @@ -22,7 +21,6 @@
'id' => '05CE15085FC09D18E99EFB22684A14CF2582E0C5',
'source' => 'https://repos.influxdata.com/influxdb.key',
},
require => Package['apt-transport-https'],
}
Class['apt::update'] -> Package['telegraf']
}
Expand Down
10 changes: 10 additions & 0 deletions spec/acceptance/nodesets/ubuntu1404.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
HOSTS:
ubuntu-server-1404-x64:
platform: ubuntu-14.04-amd64
box : puppetlabs/ubuntu-14.04-64-nocm
box_url : https://vagrantcloud.com/puppetlabs/ubuntu-14.04-64-nocm
hypervisor : vagrant
CONFIG:
masterless: true
log_level: verbose
type: git
3 changes: 3 additions & 0 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
puppet_module_install(:source => proj_root, :module_name => 'telegraf')
# Install dependancies
hosts.each do |host|
if fact('osfamily') == 'Debian'
on host, 'apt-get -y install apt-transport-https'
end
on host, puppet('module', 'install', 'puppetlabs-stdlib'), { :acceptable_exit_codes => [0,1] }
on host, puppet('module', 'install', 'puppetlabs-apt'), { :acceptable_exit_codes => [0,1] }
end
Expand Down

0 comments on commit 376f73c

Please sign in to comment.