VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # General Vagrant VM configuration. # All VMs will run under centos7 exploitation system config.vm.box = "debian/bullseye64" # If true, Vagrant will automatically insert a keypair # to use for SSH, replacing Vagrant's default insecure key # inside the machine if detected. By default, this is true config.ssh.insert_key = false # Configures synced folders on the machine, so that folders # on your host machine can be synced to and from the guest machine config.vm.synced_folder ".", "/vagrant", disabled: true # VM Provider config.vm.provider :virtualbox do |v| v.memory = 1024 v.linked_clone = true end # new server config.vm.define "newserver" do |newserver| newserver.vm.hostname = "newserver.dev" # static ip address #newserver.vm.network :private_network, ip: "192.168.56.10" newserver.vm.network :public_network, ip: "192.168.1.201" config.vm.provision "ansible" do |ansible| ansible.playbook= "./playbook.yml" ansible.inventory_path="./inventory" ansible.limit="newserver" end end end