Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #299 from caseywilliams/1804-bootstrap-fixes
Browse files Browse the repository at this point in the history
(maint) Ubuntu 18.04 bootstrap process fixups
  • Loading branch information
ScottGarman committed Apr 10, 2018
2 parents f183341 + c6cd6c0 commit 75e1d9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifests/modules/packer/manifests/vsphere.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
file { $startup_file:
owner => 'root',
group => 'root',
mode => '0755',
mode => pick($startup_file_perms, '0755'),
content => template("packer/vsphere/${startup_file_source}"),
}

Expand Down
1 change: 1 addition & 0 deletions manifests/modules/packer/manifests/vsphere/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
if $::operatingsystemrelease in ['18.04'] {
$startup_file = '/etc/systemd/system/vsphere.bootstrap.service'
$startup_file_source = 'vsphere.bootstrap.service'
$startup_file_perms = '0644'
} else {
$startup_file = '/etc/rc.local'
$startup_file_source = 'rc.local'
Expand Down
4 changes: 2 additions & 2 deletions manifests/modules/packer/templates/vsphere/ubuntu.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ puts '- Cleaning up...'

<% if ['18.04'].include? @operatingsystemrelease -%>
# With systemd-networkd, disable the oneshot service that runs this script:
Kernel.system('/bin/systemctl disable --now vsphere.bootstrap.service')
Kernel.system('/bin/systemctl disable vsphere.bootstrap.service')
<% else -%>
# With NetworkManager, /etc/rc.local is what runs this script; Make it a noop after the first run:
Kernel.system('echo "exit 0" > /etc/rc.local')
<% end -%>
puts "\n"

puts 'Done!'

0 comments on commit 75e1d9e

Please sign in to comment.