Commit 6b3f1f7e authored by Henrik Henriksson's avatar Henrik Henriksson

Append

parent 1eaba1fb
......@@ -4,12 +4,12 @@ FQDN=$1
# Add the host
ipa-getkeytab -p host/${FQDN} -k /tmp/${FQDN}.keytab || exit 1
/opt/puppetlabs/puppet/bin/eyaml encrypt --pkcs7-public-key=public_key.pkcs7.pem --output=block --label=ipa_client::keytab_content --file=/tmp/${FQDN}.keytab | tee nodes/${FQDN}.yaml
/opt/puppetlabs/puppet/bin/eyaml encrypt --pkcs7-public-key=public_key.pkcs7.pem --output=block --label=ipa_client::keytab_content --file=/tmp/${FQDN}.keytab | tee -a nodes/${FQDN}.yaml
shred /tmp/${FQDN}.keytab || exit 1
rm /tmp/${FQDN}.keytab
ROOT_PASSWORD=`pwgen -s 16 -N 1`
echo ${ROOT_PASSWORD} | mkpasswd -R 5000000 -s -m sha-512 | /opt/puppetlabs/puppet/bin/eyaml encrypt --pkcs7-public-key=public_key.pkcs7.pem --output=block --label=profiles::root::password --stdin | tee nodes/${FQDN}.yaml
echo ${ROOT_PASSWORD} | mkpasswd -R 5000000 -s -m sha-512 | /opt/puppetlabs/puppet/bin/eyaml encrypt --pkcs7-public-key=public_key.pkcs7.pem --output=block --label=profiles::root::password --stdin | tee -a nodes/${FQDN}.yaml
echo ""
echo "The output above has been saved to nodes/${FQDN}.yaml."
echo "Please commit the file and push it."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment