Sha256: 58a3eaed7a17bd66d0d670c0eedfac5a15980a24934a187ec71adfbae8dca32a

Contents?: true

Size: 1.88 KB

Versions: 70

Compression:

Stored size: 1.88 KB

Contents

class flapjack::common {

  include ruby::rubygems
  include sqlite3::dev

  $version = "0.5.3"

  package { "flapjack":
    ensure   => $version,
    provider => gem,
    require  => [ Package["rubygems"],
                  Package["libsqlite3-dev"] ],
  }

  file { "/var/run/flapjack":
    ensure  => directory,
    mode    => 777,
    require => [ Package["flapjack"] ],
  }

  file { "/etc/flapjack":
    ensure  => directory,
    require => [ Package["flapjack"] ],
  }

  exec { "symlink-latest-flapjack-gem":
    command => "ln -sf $(dirname $(dirname $(dirname $(gem which flapjack/patches)))) /usr/lib/flapjack",
    path    => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
    unless  => "readlink /usr/lib/flapjack |grep -E '$version$'",
    require => [ Package["flapjack"] ]
  }

  exec { "populate-etc-flapjack":
    command => "cp $(dirname $(dirname $(dirname $(gem which flapjack))))/dist/etc/flapjack/* /etc/flapjack",
    creates => [ "/etc/flapjack/flapjack-notifier.conf.example", "/etc/flapjack/recipients.conf.example" ],
    path    => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
    require => [ File["/etc/flapjack"],
                 Package["flapjack"] ],
  }

  file { "/etc/default/flapjack-workers":
    source  => "/usr/lib/flapjack/dist/etc/default/flapjack-workers",
    require => [ Exec["symlink-latest-flapjack-gem"] ],
  }

  file { "/etc/default/flapjack-notifier":
    source  => "/usr/lib/flapjack/dist/etc/default/flapjack-notifier",
    require => [ Exec["symlink-latest-flapjack-gem"] ],
  }

  file { "/etc/init.d/flapjack-workers":
    source  => "/usr/lib/flapjack/dist/etc/init.d/flapjack-workers",
    require => [ Exec["symlink-latest-flapjack-gem"] ],
  }

  file { "/etc/init.d/flapjack-notifier":
    source  => "/usr/lib/flapjack/dist/etc/init.d/flapjack-notifier",
    require => [ Exec["symlink-latest-flapjack-gem"] ],
  }

}

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
flapjack-0.7.29 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.28 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.27 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.26 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.25 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.22 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.21 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.20 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.19 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.18 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.17 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.16 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.15 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.14 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.13 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.12 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.11 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.10 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.9 dist/puppet/flapjack/manifests/common.pp
flapjack-0.7.8 dist/puppet/flapjack/manifests/common.pp