FAQ
Hello,

I copy past the Debian Apache2 Recipe Pattern from the Puppet wiki,
unfortunatly it raise an error with puppet 2.7.14. "Could not find
dependent Exec[reload-apache2] for Exec[/usr/sbin/a2ensite 000-default] at
/tmp/vagrant-puppet/...."
http://projects.puppetlabs.com/projects/1/wiki/Debian_Apache2_Recipe_Patterns

In the recipe, the Exec["reload-apache2"] is define in the class but it
works when i move the Exec["reload-apache2"] into the define:
...
class apache2 {
define site ( $ensure = 'present' ) {
case $ensure {
'present' : { exec { "/usr/sbin/a2ensite $name": unless => "/bin/readlink
-e ${apache2_sites}-enabled/$name", notify => Exec["reload-apache2"],
require => Package[$require], }
exec { "reload-apache2": command => "/etc/init.d/apache2 reload",
refreshonly => true, } }
...

Somehow it seems that the scope inside the define is different from the
Apache2 class. Any explanation?

Thank you
Oliv


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/5ID9n7k-RwwJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Walter Heck at Jul 30, 2012 at 9:41 pm
    Hi Olivier,

    those methods are not what I'd recommend. Instead, go and use the
    apache module from puppetlabs on github:
    https://github.com/puppetlabs/puppetlabs-apache (or get the module
    from the forge).

    Those modules are way more up to date and should work without any glitches.

    cheers,

    Walter
    On Mon, Jul 30, 2012 at 5:58 PM, Olivier Vernin wrote:
    Hello,

    I copy past the Debian Apache2 Recipe Pattern from the Puppet wiki,
    unfortunatly it raise an error with puppet 2.7.14. "Could not find dependent
    Exec[reload-apache2] for Exec[/usr/sbin/a2ensite 000-default] at
    /tmp/vagrant-puppet/...."
    http://projects.puppetlabs.com/projects/1/wiki/Debian_Apache2_Recipe_Patterns

    In the recipe, the Exec["reload-apache2"] is define in the class but it
    works when i move the Exec["reload-apache2"] into the define:
    ...
    class apache2 {
    define site ( $ensure = 'present' ) {
    case $ensure {
    'present' : { exec { "/usr/sbin/a2ensite $name": unless => "/bin/readlink -e
    ${apache2_sites}-enabled/$name", notify => Exec["reload-apache2"], require
    => Package[$require], }
    exec { "reload-apache2": command => "/etc/init.d/apache2 reload",
    refreshonly => true, } }
    ...

    Somehow it seems that the scope inside the define is different from the
    Apache2 class. Any explanation?

    Thank you
    Oliv


    --
    You received this message because you are subscribed to the Google Groups
    "Puppet Users" group.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/puppet-users/-/5ID9n7k-RwwJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to
    puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at
    http://groups.google.com/group/puppet-users?hl=en.


    --
    Walter Heck

    --
    Check out my startup: Puppet training and consulting @ http://www.olindata.com
    Follow @olindata on Twitter and/or 'Like' our Facebook page at
    http://www.facebook.com/olindata

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 30, '12 at 3:54p
activeJul 30, '12 at 9:41p
posts2
users2
websitepuppetlabs.com

2 users in discussion

Olivier Vernin: 1 post Walter Heck: 1 post

People

Translate

site design / logo © 2021 Grokbase