Skip to content

Commit

Permalink
add hostfile fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Mague committed Feb 27, 2018
1 parent 2db9b1e commit 53fa6e3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manifests/bootstrap.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# ===========================
class ec2base::bootstrap inherits ec2base {

include stdlib

file { '/usr/local/bin/parse_user_data':
ensure => present,
owner => root,
Expand Down Expand Up @@ -38,5 +40,17 @@
require => File['/lib/systemd/system/bootstrap.service']
}

file_line { 'blank_hosts':
ensure => absent,
path => '/etc/hosts',
match => "^ ${::hostname} ${::fqdn}",
match_for_absence => true,
}

file_line { 'hostfile_entry':
ensure => present,
line => "${::ipaddress} ${::hostname} ${::fqdn}",
}


}

0 comments on commit 53fa6e3

Please sign in to comment.