Puppet Class: cloudinsight_agent::ubuntu

Defined in:
manifests/ubuntu.pp

Overview

Class: cloudinsight_agent::ubuntu

This class contains the cloudinsight-agent installation mechanism for Ubuntu

Parameters:

Actions:

Requires:

Sample Usage:

Parameters:

  • apt_key (Any) (defaults to: '54B043BC')


13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'manifests/ubuntu.pp', line 13

class cloudinsight_agent::ubuntu(
  $apt_key = '54B043BC'
) {

  exec { 'cloudinsight_key':
    command => "/usr/bin/apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys ${apt_key}",
    unless  => "/usr/bin/apt-key list | grep ${apt_key} | grep expires",
    before  => File['/etc/apt/sources.list.d/cloudinsight-agent.list'],
  }

  file { '/etc/apt/sources.list.d/cloudinsight-agent.list':
    source => 'puppet:///modules/cloudinsight_agent/cloudinsight-agent.list',
    owner  => 'root',
    group  => 'root',
    notify => Exec['cloudinsight_apt-get_update'],
  }

  exec { 'cloudinsight_apt-get_update':
    command     => '/usr/bin/apt-get update',
    refreshonly => true,
  }

  package { 'cloudinsight-agent-base':
    ensure => absent,
    before => Package['cloudinsight-agent'],
  }

  package { 'cloudinsight-agent':
    ensure  => latest,
    require => [File['/etc/apt/sources.list.d/cloudinsight-agent.list'],
                Exec['cloudinsight_apt-get_update']],
  }

  service { 'cloudinsight-agent':
    ensure    => $::cloudinsight_agent::service_ensure,
    enable    => $::cloudinsight_agent::service_enable,
    hasstatus => false,
    pattern   => 'cloudinsight-agent',
    require   => Package['cloudinsight-agent'],
  }

}