puppetlabs/postgresql dependency cycle when calling class postgresql::server::contrib

asked 2014-08-20 15:34:00 -0500

sghimire gravatar image

Using module puppetlabs/postgresql, version 3.4.2.

Here is my module:

class my_postgres_module (
  $password = "postgres",
  $pgdata = $postgresql::params::datadir,
) {

  class { 'postgresql::globals':
    manage_package_repo => true,
    datadir          => $pgdata,
    version             => '9.0',
    needs_initdb      => true,
  }
  ->
  class { '::postgresql::server': 
    postgres_password => $password,
    ipv4acls     => ['host   all   all  0.0.0.0/0  md5']
  }
  ->
  class { '::postgresql::server::contrib':
  }
}

I get the following error:

Error: Could not apply complete catalog: Found 1 dependency cycle:
(Anchor[postgresql::server::contrib::start] => Class[Postgresql::Server::Install] => Package[postgresql-server] => Class[Postgresql::Server::Install] => Package[postgresql-contrib] => Class[Postgresql::Server::Service] => Anchor[postgresql::server::service::begin] => Class[Postgresql::Server::Service] => Class[Postgresql::Server::Passwd] => Exec[set_postgres_postgrespw] => Class[Postgresql::Server::Passwd] => Class[Postgresql::Server::Firewall] => Class[Postgresql::Server::Firewall] => Anchor[postgresql::server::end] => Class[Postgresql::Server] => Class[Postgresql::Server::Contrib] => Package[postgresql-contrib])
Cycle graph written to /var/opt/lib/pe-puppet/state/graphs/cycles.dot

Does anyone know how to install the contrib package using this module? Currently when we don't include the postgresql::server::contrib class, the contrib package is not installed (We verified this by doing a yum list).

edit retag flag offensive close merge delete