Open majamassarini opened 1 month ago
Does remote_user
work when connection: local
? Maybe can try ansible_user
instead of remote_user
?
https://github.com/teemtee/tmt/blob/ae941d11c9783b211fbf3bb0b5ad535da68a83d3/tmt/steps/provision/local.py#L55-L63
It should work when provision: container
?
Does
remote_user
work whenconnection: local
? Maybe can tryansible_user
instead ofremote_user
?
I can't use ansible_user
is not recognized by my ansible version.
And as far as I can understand the above playbook is called with this command:
ansible-playbook -vvv --ssh-common-args '-oForwardX11=no -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null -oConnectionAttempts=5 -oConnectTimeout=60 -oServerAliveInterval=5 -oServerAliveCountMax=60 -oIdentitiesOnly=yes -p10028 -i /var/tmp/tmt/prova/plans/deployment/local/provision/default-0/id_ecdsa -oPasswordAuthentication=no -S/run/user/1000/tmt/tmp51rub2tx' -i root@127.0.0.1, /home/maja/deployment/playbooks/oc-cluster-setup.yml
I don't see the -c
option used here.
It should work when
provision: container
?
I didn't try it.
Found it, seems to be in the generic ssh guest.
I think the issue here is that cli would always have priority. If tmt can learn to use inventory file, host, group files, it should give better control
If I run the ansible playbook below in the
prepare
step of a locally virtual provisioned tmt machine I always getroot
as an output.If I change the
remote_user
key with thebecome_user
key then I get thepackit
user. Unfortunately I can't use thebecome_user
directive because I need a full working systemd environment for thepackit
user and this could be achieved logging intopackit
directly through ssh.