Used the following to get it working. Test.sh contains the logic to make the changes to the network.
config.vm.provision "shell", path: "test.sh" :) On Tuesday, March 10, 2020 at 2:43:14 PM UTC-7, j wrote: > > Hi! > > I have been trying to add the lines below > in /etc/sysconfig/network-scripts/ifcfg-eth0. > > DHCP_FQDN=server1.example.com > PEERDNS=yes > > Here are my specs. > Vagrant 2.2.7 > > Vagrantfile > Vagrant.configure("2") do |config| > > config.vm.box = "bento/centos-8.1" > > end > > I have tried adding the following in the config. > > config.vm.network "public_network", DHCP_FQDN: "server1.example.com", > PEERDNS: "yes" > > and > > config.vm.provision "shell", inline: <<-SHELL > echo -e "DHCP_FQDN=server1.example.com\nPEERDNS=yes" >> /etc/sysconfig/ > network-scripts/ifcfg-eth1 > systemctl restart NetworkManager.service" > SHELL > > Help. > > Thank you in advance. > > Regards, > j > > > > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/vagrant/issues IRC: #vagrant on Freenode --- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/45485f67-d650-49e8-9b27-098308651be0%40googlegroups.com.