Skip to content

Commit

Permalink
Add SSH keys and hostname and domain settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jullienl committed Nov 18, 2021
1 parent 0eec955 commit 8c80d29
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions files/ESXi_17630552/ks-esxi7.1u2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ fi
%firstboot --interpreter=busybox

# Hostname and domain settings
HostName="{{inventory_hostname}}"
SuffixDNS="{{domain}}"
FQDN="{{inventory_hostname}}.{{domain}}"
esxcli system hostname set --host="{{inventory_hostname}}"
esxcli system hostname set --fqdn="{{inventory_hostname}}.{{domain}}"
esxcli network ip dns search add --domain="{{domain}}"

# Adding Ansible control node SSH public key to host authorized_keys
echo "Installing Ansible SSH public key"
cat <<EOF >/etc/ssh/keys-root/authorized_keys
{{ansible_ssh_public_key}}
Expand Down

0 comments on commit 8c80d29

Please sign in to comment.