mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Vagrantfile: set DNS configuration in network-scripts
The Vagrantfile puts the server's address in /etc/resolv.conf but this configuration will not survive a reboot or network restart. Add configuration to /etc/sysconfig/network-scripts/ to ensure the correct resolver is always used.
This commit is contained in:
parent
bc1c5a84bd
commit
345850eb6c
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@ -33,6 +33,10 @@ Vagrant.configure(2) do |config|
|
||||
replica.vm.network "private_network", ip: "192.168.33.11"
|
||||
replica.vm.hostname = "replica.ipademo.local"
|
||||
|
||||
replica.vm.provision "shell",
|
||||
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
||||
replica.vm.provision "shell",
|
||||
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
||||
replica.vm.provision "shell",
|
||||
inline: 'echo "nameserver 192.168.33.10" > /etc/resolv.conf'
|
||||
end
|
||||
@ -41,6 +45,10 @@ Vagrant.configure(2) do |config|
|
||||
client.vm.network "private_network", ip: "192.168.33.20"
|
||||
client.vm.hostname = "client.ipademo.local"
|
||||
|
||||
client.vm.provision "shell",
|
||||
inline: 'echo "PEERDNS=no" >> /etc/sysconfig/network-scripts/ifcfg-eth0'
|
||||
client.vm.provision "shell",
|
||||
inline: 'echo "DNS1=192.168.33.10" >> /etc/sysconfig/network-scripts/ifcfg-eth1'
|
||||
client.vm.provision "shell",
|
||||
inline: 'echo "nameserver 192.168.33.10" > /etc/resolv.conf'
|
||||
client.vm.provision "shell",
|
||||
|
Loading…
Reference in New Issue
Block a user