Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cb328fb

Browse files
Merge pull request #15 from binford2k/fix_no_ensure
Correct an error with #10
2 parents 7ab490b + 506b9fe commit cb328fb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

‎examples/notify.pp‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
transition { 'run twice':
2+
resource => Notify['message'],
3+
attributes => { message => 'This content should display before' },
4+
prior_to => Notify['ending'],
5+
}
6+
7+
notify { 'message':
8+
message => 'This content should display after'
9+
}
10+
11+
notify { 'ending':
12+
message => 'The end'
13+
}

‎lib/puppet/provider/transition/ruby.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ def transition?
6868
# (and may trigger false positives).
6969
current_ensure = current_values[:ensure]
7070
prop_ensure = resource.property(:ensure)
71-
if prop_ensure.should == :absent && prop_ensure.safe_insync?(current_ensure)
71+
if prop_ensure && prop_ensure.should == :absent && prop_ensure.safe_insync?(current_ensure)
7272
next false
7373
end
74-
74+
7575
resource.properties.any? do |property|
7676
current_value = current_values[property.name]
7777
if property.should && !property.safe_insync?(current_value)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /