Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Lysator
Puppet
hiera
Commits
6b3f1f7e
Commit
6b3f1f7e
authored
Aug 28, 2020
by
Henrik Henriksson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Append
parent
1eaba1fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
new_host.sh
new_host.sh
+2
-2
No files found.
new_host.sh
View file @
6b3f1f7e
...
...
@@ -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."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment