You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.6 KiB

  1. # -*- mode: ruby -*-
  2. # vi: set ft=ruby :
  3. VAGRANT_CONFIG_VERSION = "2"
  4. Vagrant.configure(VAGRANT_CONFIG_VERSION) do |config|
  5. # Using the "contrib" version for vboxsf module for synced folders
  6. config.vm.box = "debian/contrib-buster64"
  7. # Main application folder
  8. config.vm.synced_folder "tildes/", "/opt/tildes/"
  9. config.vm.synced_folder "ansible/", "/srv/ansible"
  10. config.vm.network "forwarded_port", guest: 443, host: 4443
  11. config.vm.network "forwarded_port", guest: 9090, host: 9090
  12. config.vm.provision "ansible_local" do |ansible|
  13. ansible.install_mode = "pip"
  14. # Since Debian Buster still uses Python 2.7 by default and the pip bootstrap
  15. # script is no longer compatible with 2.7, we need to specify the installation
  16. # command manually. If we upgrade to a newer version of Debian that defaults to
  17. # Python 3.6+, this should no longer be necessary.
  18. ansible.pip_install_cmd = "sudo apt-get install -y python3-distutils && curl -s https://bootstrap.pypa.io/get-pip.py | sudo python3"
  19. # Vagrant doesn't currently recognize the new format for Ansible versions
  20. # (e.g. "ansible [core 2.11.1]"), so the compatibility mode is set incorrectly.
  21. # A new version of Vagrant should resolve this soon.
  22. ansible.compatibility_mode = "2.0"
  23. # put the VM into the "dev" and "app_server" Ansible groups
  24. ansible.groups = {
  25. "dev" => ["default"],
  26. "app_server" => ["default"],
  27. }
  28. ansible.galaxy_role_file = "ansible/requirements.yml"
  29. ansible.playbook = "ansible/playbook.yml"
  30. end
  31. config.vm.provider "virtualbox" do |vb|
  32. vb.memory = "4096"
  33. vb.cpus = "4"
  34. end
  35. end