garethr-docker icon indicating copy to clipboard operation
garethr-docker copied to clipboard

File resource service_overrides_template cannot be removed

Open tux-o-matic opened this issue 6 years ago • 2 comments

Today the systemd file defined by $service_overrides_template creates a file if not set to undef. However, if the if conditional statement is negative, it does not remove the the file.

It should be possible to control the ensure value from the File resource

tux-o-matic avatar Aug 09 '17 10:08 tux-o-matic

Try service_overrides_template => false This will stop from creating the file. I had to do this because this module actually breaks default Centos7.3 Docker installation. This is my workaround:

  class { 'docker':
      use_upstream_package_source => false,
      package_name                => 'docker',
      service_overrides_template  => false, # Required as Docker module breaks default Centos Docker installation.
      service_config              => false, # Required as Docker module breaks default Centos Docker installation.
      storage_config              => false, # Required as Docker module breaks default Centos Docker installation.
    }

starchx avatar Aug 17 '17 05:08 starchx

@starchx as I mentioned, the problem is that the module does not clean after itself if at some point it already created the file. So setting the value to false will not help if the file was already created previously.

tux-o-matic avatar Aug 17 '17 07:08 tux-o-matic