diff --git a/roles/post-install/template/generateldif.sh.j2 b/roles/post-install/template/generateldif.sh.j2 index ade6ba9..4deab9c 100755 --- a/roles/post-install/template/generateldif.sh.j2 +++ b/roles/post-install/template/generateldif.sh.j2 @@ -35,8 +35,10 @@ opensshFingerprintECDSA=$(ssh-keyscan -t ecdsa-sha2-nistp256 localhost 2>/dev/nu Fingerprint="${opensshFingerprintRSA}${opensshFingerprintRSA:+;}"\ "${opensshFingerprintED25519}${opensshFingerprintED25519:+;}${opensshFingerprintECDSA}" -cat</root/${EvoComputerName}.ldif -# ldapvi --profile evolix --add --in ${EvoComputerName}.ldif +ldif_file="/root/${EvoComputerName}.$(date +"%Y%m%d%H%M%S").ldif" + +cat<${ldif_file} +# ldapvi --profile evolix --add --in ${ldif_file} dn: EvoComputerName=${EvoComputerName},ou=computer,dc=evolix,dc=net dnsArecord: $EvoComputerName @@ -149,7 +151,7 @@ ServiceVersion: packetfilter EOT if egrep -q 'sd.*RAID' /var/run/dmesg.boot; then -cat<>/root/${EvoComputerName}.ldif +cat<>${ldif_file} dn: ServiceName=bioctl,EvoComputerName=${EvoComputerName},ou=computer,dc=evolix,dc=net objectClass: EvoService NagiosEnabled: TRUE