-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVagrantfile
More file actions
52 lines (41 loc) · 1.52 KB
/
Vagrantfile
File metadata and controls
52 lines (41 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.require_version ">= 2.2.9"
Vagrant.configure("2") do |config|
config.vagrant.plugins = {"vagrant-env" => {"version" => "0.0.3"}}
config.vm.define "laprimaire_2022" do |host|
host.vm.box = "ubuntu/focal64"
host.vm.hostname = "2022.laprimaire.org.test"
host.vm.network "private_network", ip: "192.168.142.2"
host.vm.provider "virtualbox" do |vb|
vb.memory = 4096
vb.cpus = 2
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
end
config.vm.define "ansible" do |host|
host.vm.box = "ubuntu/focal64"
host.vm.synced_folder ".", "/vagrant", mount_options: ['dmode=775,fmode=700']
host.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
host.env.enable
host.vm.provision "shell", path: "./script/install_ansible.sh"
host.vm.provision "ansible_local" do |ansible|
ansible.version = "2.9.0"
ansible.install = false
ansible.verbose = 'v'
ansible.limit = ENV['ANSIBLE_LIMIT'] || "all"
ansible.raw_arguments = ENV['ANSIBLE_EXTRA_ARGS']
ansible.config_file = "provisioning/ansible.cfg"
ansible.playbook = "provisioning/playbook.yml"
ansible.inventory_path = "provisioning/hosts.yml"
ansible.become = true
ansible.playbook_command = "/vagrant/script/ansible-playbook.sh"
ansible.extra_vars = {
ansible_ssh_user: "vagrant",
base_hostname: "laprimaire.org.test"
}
end
end
end