Skip to content

Commit

Permalink
Fixes #37901 - Set root password through Cloudinit deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
sayan3296 committed Nov 7, 2024
1 parent 9d0f388 commit 08d004f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ hostname: <%= @host.name %>
fqdn: <%= @host %>
manage_etc_hosts: true
users: {}
<% if @host.provision_method == 'image' && root_pass.present? -%>
chpasswd:
expire: False
users:
- {name: root, password: <%= root_pass -%>}
<% end -%>

runcmd:
- |
<%= indent(2) { snippet 'fix_hosts' } -%>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ hostname: snapshot-ipv4-dhcp-deb10
fqdn: snapshot-ipv4-dhcp-deb10
manage_etc_hosts: true
users: {}

runcmd:
- |
echo "" > /etc/hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ hostname: snapshot-ipv4-dhcp-el7
fqdn: snapshot-ipv4-dhcp-el7
manage_etc_hosts: true
users: {}

runcmd:
- |
echo "" > /etc/hostname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ hostname: snapshot-ipv4-dhcp-ubuntu18
fqdn: snapshot-ipv4-dhcp-ubuntu18
manage_etc_hosts: true
users: {}

runcmd:
- |
echo "" > /etc/hostname
Expand Down

0 comments on commit 08d004f

Please sign in to comment.