ansible-node04 만들어보셈!

  1. CPU 2core
  2. RAM 1GB
  3. IP address: 172.16.1.14
  4. Image: generic/ubuntu1804
############ Ansible node04 ############
  config.vm.define "ansible-node04" do |cfg|
    cfg.vm.provider :libvirt do |resource|
      resource.cpus = 2
      resource.memory = 1024
    end
    cfg.vm.box = "generic/ubuntu1804"
    cfg.vm.host_name = "ansible-node04"
    cfg.vm.network "private_network", ip: "172.16.1.14"
    cfg.vm.network "forwarded_port", guest: 22, host: 60014, auto_correct: true, id: "ssh"
    cfg.vm.provision "shell", inline: "sed -i -e 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config"
    cfg.vm.provision "shell", inline: "systemctl restart sshd"
  end

쉽죠?