Skip to content

Instantly share code, notes, and snippets.

@stack72
Created June 11, 2013 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stack72/5756097 to your computer and use it in GitHub Desktop.
Save stack72/5756097 to your computer and use it in GitHub Desktop.
Puppet manifest to manage a single host file entry on windows
class hosts {
host { 'www.mysite.com':
ip => '127.0.0.1',
host_aliases => [ 'mysite.com', 'secure.mysite.com' ],
notify => Exec['flush_dns'],
}
exec { 'flush_dns':
command => 'powershell.exe -executionpolicy unrestricted -Command "C:\windows\system32\ipconfig.exe /flushdns"',
path => $::path,
refreshonly => true,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment