Ask Your Question
0

Dependency cycle using Apache::Vhost?

asked 2015-08-06 19:21:17 -0600

pgib gravatar image

I'm trying out the puppetlabs-apache module to set up a new Apache server, and I'm having trouble as soon as I add a virtualhost:

Error: Could not apply complete catalog: Found 1 dependency cycle:
(Exec[concat_/etc/httpd/conf/ports.conf] => Concat[/etc/httpd/conf/ports.conf] => Class[Apache] => Apache::Vhost[foo.bar.com] => Apache::Listen[80] => Concat::Fragment[Listen 80] => File[/var/lib/puppet/concat/_etc_httpd_conf_ports.conf/fragments/10_Listen 80] => Exec[concat_/etc/httpd/conf/ports.conf])

My config looks like so:

class { 'apache':
  server_signature     => 'Off',
  server_tokens        => 'Prod',
  default_mods         => $mods,
  default_vhost        => false,
  user                 => 'www',
  group                => 'www',
  mpm_module           => 'prefork'
}

->

apache::vhost { 'foo.bar.com':
  servername      => 'foo.bar.com',
  port            => '80',
  ip_based        => true,
  priority        => '5',
  docroot         => '/home/foo/websites/bar.com',
  manage_docroot  => false
}

Even if I reduce that to the most basic example found in the README, I get the same issue:

apache::vhost { 'first.example.com':
  port    => '80',
  docroot => '/var/www/first',
}

Yields:

(Exec[concat_/etc/httpd/conf/ports.conf] => Concat[/etc/httpd/conf/ports.conf] => Class[Apache] => Apache::Vhost[first.example.com] => Apache::Listen[80] => Concat::Fragment[Listen 80] => File[/var/lib/puppet/concat/_etc_httpd_conf_ports.conf/fragments/10_Listen 80] => Exec[concat_/etc/httpd/conf/ports.conf])

I'm running Puppet 3.7.4 on Amazon Linux (latest). Am I doing something really wrong?

mod 'puppetlabs/apache', '1.6.0
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-06 19:56:47 -0600

pgib gravatar image

Ah, the dependency arrow was the issue. I was thinking the class { 'apache': } had to happen first.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-06 19:21:17 -0600

Seen: 353 times

Last updated: Aug 06 '15