Issue #3788 has been updated by Nigel Kersten.

This isn't what I would have expected given how require/before work with tags.

running this with --tags=x
<pre>

file { "/tmp/nigelk/one":
  content => "one",
  tag => "x",
}


file { "/tmp/nigelk/two":
  content => "two",
  tag => "x",
  require => Exec["foo"],
}

exec { "foo":
  command => "/bin/echo one > /tmp/nigelk/exec",
}
</pre>

won't run Exec['foo'], but subscribe/notify does.

----------------------------------------
Bug #3788: subscribe overrides tags
http://projects.puppetlabs.com/issues/3788

Author: Alan Barrett
Status: Unreviewed
Priority: Normal
Assigned to: 
Category: 
Target version: 
Affected version: 0.25.4
Keywords: 
Branch: 


If an exec subscribes to a file, then running puppetd with "tags=file" 
nevertheless runs the exec.

Manifest:
<pre>
$script = "/usr/local/bin/myscript"
$config = "/usr/local/etc/myscript.conf"
file { $script:
    source => ...
}
file { $config:
    source => ...
}
exec { "run myscript":
    command => "${script} ${config}",
    subscribe => [ File[$script], File[$config] ],
}
</pre>

Command:
<pre>
puppetd --onetime --test --no-noop --tags=file
</pre>

Result: The files are installed, and the exec is run.

Desired result: The files are installed and the exec is not run.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

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

Reply via email to