• Ewoud Kohl van Wijngaarden's avatar
    Drop Puppet 4 and 5 support + daemon-reload code (#171) · 97dd16fa
    Ewoud Kohl van Wijngaarden authored
    * Drop Puppet 4 and 5 support
    
    This picks version 6.1.0 as a new lower bound since that contains code
    to automatically run daemon-reload if needed. Versions 4 and 5 are EOL.
    
    * Drop daemon-reload code
    
    Since Puppet 6.1.0 it's no longer needed to run daemon-reload manually
    when restarting a service. That means it's possible to drop this code.
    
    * Implement a workaround for PUP-9473.
    
    Prior to this commit, the follow code did not suffer from PUP-9473:
    
        systemd::unit_file { 'myservice.service':
          ensure => absent,
          active => true,
        }
    
    That's because the module considers that an invalid state and fails to
    compile.
    
    The follow code did trigger the bug:
    
        systemd::unit_file { 'myservice.service':
          ensure => absent,
        }
    
        service { 'myservice':
          ensure  => running,
          require => Systemd::Unit_file['myservice.service'],
        }
    
    That's precisely what happens when a module switches from a
    module-provided unit file to a package-provided unit file.
    97dd16fa