feat: test ansible inventory
This commit is contained in:
8
Vagrantfile
vendored
8
Vagrantfile
vendored
@@ -1,4 +1,10 @@
|
||||
Vagrant.configure("2") do |config|
|
||||
config.vm.box = "generic/ubuntu2204"
|
||||
config.ssh.private_key_path = "~/.ssh/id_rsa"
|
||||
config.vm.provision "shell" do |s|
|
||||
ssh_pub_key = File.readlines("/home/rralambo/.ssh/id_rsa.pub").first.strip
|
||||
s.inline = <<-SHELL
|
||||
echo #{ssh_pub_key} >> /home/vagrant/.ssh/authorized_keys
|
||||
echo #{ssh_pub_key} >> /root/.ssh/authorized_keys
|
||||
SHELL
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user