Hello Alessandro, I relocated the dependency declaration into the native types and also removed two stray semi-colons. After reviewing the dot graph, I also made "Secure Check File" a dependency of "Validate Check File". The updated class is below.
Puppet still does not honor the "Validate Check File" -> "Make Sudo File Live" dependency, even with these changes. The sudo check failed because my sudo template was missing an EOL character. I am able to prevent the failure by appending '<% %>' to the bottom of the template. Thank you for checking the class. I think it is correct and this dependency problem is a bug. Regards, Jon ================== class s_sudo ( $wheel_req_password = true ) inherits s_sudo::params { ### Assemble the sudo check file from fragments file { "Sudo_Fragment_Directory": path => "${s_sudo::params::sudo_fragment_directory}", ensure => directory, purge => true, recurse => true, } file {"Sudo_Header": path => "${s_sudo::params::sudo_header_file}", content => template("s_sudo/00-sudobase.erb"), notify => Exec["Assemble_Sudo_Fragments"], } exec { "Assemble_Sudo_Fragments": command => "/bin/cat $ {s_sudo::params::sudo_fragment_directory}/* > $ {s_sudo::params::sudo_check_file}", refreshonly => true, subscribe => File["Sudo_Fragment_Directory"], notify => Exec["Validate_Check_File"], } file { 'Secure_Check_File': # Secure the check file path => "${s_sudo::params::sudo_check_file}", mode => 644, require => Exec['Assemble_Sudo_Fragments'], } exec {"Validate_Check_File": command => "visudo -cf $ {s_sudo::params::sudo_check_file}", refreshonly => true, require => File['Secure_Check_File'], } file {"Make_Sudo_File_Live": path => "/etc/sudoers", source => "${s_sudo::params::sudo_check_file}", mode => 440, owner => root, group => root, require => Exec["Validate_Check_File"], } } On Jul 21, 6:57 am, "Al @ Lab42" <lab42...@gmail.com> wrote: > Hi Jon, > I personally don't use (and don't see much value added, but I'm open to > alternative opinions) the "new" > Exec["Assemble_Sudo_Fragments"] ~> Exec["Validate_Check_File"] -> > File["Make_Sudo_File_Live"] > syntax to manage dependencies, so I can't say why it didn't work as > expected. > > I would rather try adding the require argument here: > > file {"Make_Sudo_File_Live": > path => "/etc/sudoers", > source => "${s_sudo::params::sudo_check_file}", > mode => 440, > owner => root, > group => root, > * require => Exec["Validate_Check_File"],* > } > > Alessandro -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.