From 83c84d2eb8d5325e5b685e71302251aa0dcc7d21 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sun, 21 Feb 2021 10:46:00 +0700 Subject: [PATCH] Use root for ansible --- test/Vagrantfile | 3 ++- test/hosts.ini | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test/Vagrantfile b/test/Vagrantfile index 63f2a964..66159cb5 100644 --- a/test/Vagrantfile +++ b/test/Vagrantfile @@ -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 diff --git a/test/hosts.ini b/test/hosts.ini index e19ded56..d090be9b 100644 --- a/test/hosts.ini +++ b/test/hosts.ini @@ -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