Advertisement
PandaAcademy

Ansible 2 vagrantfile

Nov 20th, 2022 (edited)
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.58 KB | None | 0 0
  1. Vagrant.configure("2") do |config|
  2.     config.vm.box = "bento/ubuntu-20.04"
  3.    
  4.     config.vm.provider "virtualbox" do |v|
  5.       v.memory = 10240
  6.       v.cpus = 3
  7.     end
  8.    
  9.     config.vm.network "private_network", ip: "192.168.44.44"
  10.    
  11.     config.vm.provision "ansible_local" do |ansible|
  12.         ansible.galaxy_role_file = 'requirements.yml'
  13.         ansible.galaxy_roles_path = "/etc/ansible/roles"
  14.         ansible.galaxy_command = "sudo ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path}"
  15.         ansible.playbook = "playbooks/init.yml"
  16.     end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement