feat: test ansible inventory

This commit is contained in:
Lenoctambule
2026-03-09 18:29:49 +01:00
parent 1195710df3
commit 44d8f5d562
4 changed files with 14 additions and 4 deletions

8
Vagrantfile vendored
View File

@@ -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

0
ansible.cfg Normal file
View File

6
inventory.yml Normal file
View File

@@ -0,0 +1,6 @@
hosts:
hosts:
127.0.0.1:
ansible_port: 2222
ansible_user: vagrant

View File

@@ -1,5 +1,3 @@
#!/bin/bash
export VAGRANT_HOME=/goinfre/$(whoami)/.vagrant.d
vagrant up