I want to replace some files from an archive.


I'm running following commands successfull on the shell.


tar -xf /root/ldap_etc.tar.gz -C /etc/
 
chown -R root:root /etc/ldap/ ; chown -R openldap:openldap /etc/ldap/slapd.d/

After doing this, i'm able to start and stop the corresponding service.


Now in Puppet:


exec { "command 1": 
  command => "bash --login -c 'tar -xf /root/ldap_etc.tar.gz -C /etc/'", 
  path => ['/bin', '/usr/bin'], 
}

exec { "command 2":
  command     => "bash --login -c 'chown -R root:root /etc/ldap/ ; chown -R 
openldap:openldap /etc/ldap/slapd.d/'",
  path => ['/bin', '/usr/bin'],
}


The service is not able to start!


All files are copied successfull and the rights are set right. 


I changed the command execution in the way to set user, cwd and so on 
without bash --login -c ... but there is no difference.


I'm not understanding the difference between puppet and shell execution. 
Why i get an error?


[23039]: @(#) $OpenLDAP: slapd  (Jan 16 2016 23:00:08) $
root@chimera:/tmp/buildd/openldap-2.4.40+dfsg/debian/build/servers/slapd[23039]:
 olcBackend: value #0: <olcBackend> failed init (mdb)![23039]: config error 
processing olcBackend={0}mdb,cn=config: <olcBackend> failed init[23039]: 
DIGEST-MD5 common mech free[23039]: slapd stopped.[23039]: connections_destroy: 
nothing to destroy.[23035]: Starting OpenLDAP: slapd failed!
systemd[1]: slapd.service: control process exited, code=exited status=1
systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight 
Directory Access Protocol).
systemd[1]: Unit slapd.service entered failed state.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/ac954073-8ebc-44c7-8b0d-d3fb3ce17c13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to