parameters = {:name => 'test', :notify => 'Service[test-service]', :value => '10}
res = catalog.create_resource('test_resource', parameters)
target = catalog.resource 'service', 'test-service'
Puppet::Relationship.new(res, target, {:event => :ALL_EVENTS, :callback =>:refresh})
Debug: /Stage[main]/Main/Asd[test_resource]: test_resource[test]: was not found in the catalog, creating itInfo: Applying configuration version '1454091309'Notice: /test_resource[test]/value: value changed '123' to '10'Debug: Executing '/sbin/status test-service'Debug: Finishing transaction 29127600Debug: Storing stateDebug: Stored state in 0.75 secondsNotice: Finished catalog run in 1.45 seconds
asd { 'test_resource': data => { 'test' => {'value'=> '10'}, },}
service { 'test-service': ensure => running}
New resources are added to catalog, but unfortunately notify is not working.
parameters = {:name => 'test', :notify => 'Service[test-service]', :value => '10}
res = catalog.create_resource('test_resource', parameters)
target = catalog.resource 'service', 'test-service'
Puppet::Relationship.new(res, target, {:event => :ALL_EVENTS, :callback =>:refresh})
Log:
Debug: /Stage[main]/Main/Asd[test_resource]: test_resource[test]: was not found in the catalog, creating itInfo: Applying configuration version '1454091309'Notice: /test_resource[test]/value: value changed '123' to '10'Debug: Executing '/sbin/status test-service'Debug: Finishing transaction 29127600Debug: Storing stateDebug: Stored state in 0.75 secondsNotice: Finished catalog run in 1.45 seconds
Manifest:
asd { 'test_resource':data => {'test' => {'value'=> '10'},},}
service { 'test-service':ensure => running}
Any hints what im missing?