spacepants / puppet-ds_389

Puppet module to manage 389 Directory Server
1 stars 15 forks source link

/etc/sysconfig is not present on Debian (based) systems #13

Closed Mosibi closed 6 years ago

Mosibi commented 6 years ago

Creating a instance on a Ubuntu 16.04 system, results in this error message:

Error: Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /etc/sysconfig/dirsrv.systemd at /etc/puppetlabs/code/environments/production/modules/ds_389/manifests/install.pp:36
Error: Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /etc/sysconfig/dirsrv.systemd at /etc/puppetlabs/code/environments/production/modules/ds_389/manifests/install.pp:36
Wrapped exception:
No such file or directory @ rb_sysopen - /etc/sysconfig/dirsrv.systemd
Error: /Stage[main]/Ds_389::Install/Ini_setting[dirsrv ulimit]/ensure: change from 'absent' to 'present' failed: Could not set 'present' on ensure: No such file or directory @ rb_sysopen - /etc/sysconfig/dirsrv.systemd at /etc/puppetlabs/code/environments/production/modules/ds_389/manifests/install.pp:36

In this code block, /etc/sysconfig should be a param, on Debian based systemd, this file can be found here: /etc/default/dirsrv.systemd

 if $::ds_389::params::service_type == 'systemd' {
    ini_setting { 'dirsrv ulimit':
      ensure  => present,
      path    => '/etc/sysconfig/dirsrv.systemd',
      section => 'Service',
      setting => 'LimitNOFILE',
      value   => '8192',
      require => Package[$::ds_389::package_name],
    }
  }
  else {
    file_line { 'dirsrv ulimit':
      ensure  => present,
      path    => '/etc/sysconfig/dirsrv',
      line    => 'ulimit -n 8192',
      require => Package[$::ds_389::package_name],
    }
  }
spacepants commented 6 years ago

Thanks for raising an issue. This is resolved with version 1.1.7.