Skip to content

Commit

Permalink
Fixes #15360 - UserData default should Patch the system and reboot (t…
Browse files Browse the repository at this point in the history
  • Loading branch information
edestecd authored and ares committed Aug 14, 2017
1 parent ceb551f commit 595919a
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions cloudinit/userdata_cloudinit.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ oses:
- Debian
- Ubuntu
-%>
<%#
This template accepts the following parameters:
- package_upgrade: boolean (default=false)
- reboot: boolean (default=false)
-%>
#cloud-config
hostname: <%= @host.shortname %>
fqdn: <%= @host %>
Expand All @@ -41,8 +46,19 @@ users:
lock-passwd: false
passwd: <%= @host.root_pass %>
<% if @host.param_true?('package_upgrade') -%>
package_upgrade: true
<% end -%>
<%# Contact Foreman to confirm instance is built -%>
phone_home:
url: <%= foreman_url('built') %>
post: []
tries: 10
url: <%= foreman_url('built') %>
post: []
tries: 10

<% if @host.param_true?('reboot') -%>
power_state:
mode: reboot
timeout: 30
condition: true
<% end -%>

0 comments on commit 595919a

Please sign in to comment.