forked from cockpit-project/cockpit-podman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
33 lines (24 loc) · 1.01 KB
/
Vagrantfile
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
Vagrant.configure(2) do |config|
config.vm.box = "fedora/32-cloud-base"
config.vm.network "forwarded_port", guest: 9090, host: 9090
if Dir.glob("dist/*").length == 0
config.vm.post_up_message = "NOTE: Distribution directory is empty. Run `make` to see your module show up in cockpit"
end
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "dist/", "/usr/local/share/cockpit/" + File.basename(Dir.pwd), type: "rsync", create: true
config.vm.provider "libvirt" do |libvirt|
libvirt.memory = 1024
end
config.vm.provider "virtualbox" do |virtualbox|
virtualbox.memory = 1024
end
config.vm.provision "shell", inline: <<-EOF
set -eu
sudo dnf install -y cockpit podman
printf "[WebService]\nAllowUnencrypted=true\n" > /etc/cockpit/cockpit.conf
systemctl enable cockpit.socket
systemctl start cockpit.socket
systemctl enable io.podman.socket
systemctl start io.podman.socket
EOF
end