Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

file_line with noop mode

$
0
0
Is it possible for `file_line` to work correctly with noop mode? I want to change a few settings in a file that gets pulled by a package (*sentinel.conf* from *redis-sentinel*), while still allowing for noop to work correctly (i.e. not failing entire process). Simplified use case boils down to: file { '/tmp/test1': # real code uses package{'redis-server': ...} here ensure => present, content => 'test' } -> file_line { 'test1_change': path => '/tmp/test1', line => "test ok", match => '^test', require => File['/tmp/test1'] } which fails with Debug: /Stage[main]/Main/File[/tmp/test1]/before: before to File_line[test1_change] Debug: /Stage[main]/Main/File_line[test1_change]/require: require to File[/tmp/test1] Notice: /Stage[main]/Main/File[/tmp/test1]/ensure: current_value 'absent', should be 'present' (noop) Debug: /Stage[main]/Main/File[/tmp/test1]: The container Class[Main] will propagate my refresh event Error: /Stage[main]/Main/File_line[test1_change]: Could not evaluate: No such file or directory @ rb_sysopen - /tmp/test1

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>