mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-24 18:06:16 +07:00
Use root for ansible
This commit is contained in:
parent
a4ad17310e
commit
83c84d2eb8
3
test/Vagrantfile
vendored
3
test/Vagrantfile
vendored
@ -17,6 +17,7 @@ Vagrant.configure("2") do |config|
|
||||
config.vm.provision "file", source: "~/.ssh/id_rsa.pub", destination: "/tmp/id_rsa.pub"
|
||||
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
cat /tmp/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys
|
||||
mkdir /root/.ssh
|
||||
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys
|
||||
SHELL
|
||||
end
|
||||
|
@ -1,3 +1,6 @@
|
||||
[metal]
|
||||
metal0 ansible_host=192.168.50.2 ansible_user=vagrant
|
||||
metal1 ansible_host=192.168.50.3 ansible_user=vagrant
|
||||
metal0 ansible_host=192.168.50.2
|
||||
metal1 ansible_host=192.168.50.3
|
||||
|
||||
[metal:vars]
|
||||
ansible_user=root
|
||||
|
Loading…
Reference in New Issue
Block a user