Skip to content

Instantly share code, notes, and snippets.

@mklasen
Created January 4, 2018 22:37
Show Gist options
  • Save mklasen/e9484b08b79a8fe11db190c80ac7912d to your computer and use it in GitHub Desktop.
Save mklasen/e9484b08b79a8fe11db190c80ac7912d to your computer and use it in GitHub Desktop.
Working vagrant-hostupdater sudoers.d file for MacOS
# Allow passwordless startup of Vagrant with vagrant-hostsupdater.
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /usr/bin/sed -i -e /*/ d /etc/hosts
%admin ALL=(root) NOPASSWD: VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment