Use root for ansible

This commit is contained in:
Khue Doan 2021-02-21 10:46:00 +07:00
parent a4ad17310e
commit 83c84d2eb8
2 changed files with 7 additions and 3 deletions

3
test/Vagrantfile vendored
View File

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

View File

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