“vagrant provision” works, but I cannot send an ad-hoc command with Ansible

后端 未结 2 1242
南方客
南方客 2021-01-14 17:38

I have set up a machine with Vagrant, and created a basic Ansible playbook for it. Everything works as expected when I run

vm-abla> vagrant provision
         


        
2条回答
  •  生来不讨喜
    2021-01-14 17:54

    I managed:

    vm-abla> ansible jon -i provisioning/hosts -a "echo 'TEST'" -vvvv -c ssh --user=vagrant --private-key=~/.vagrant.d/insecure_private_key
    

    But if someone has a more elegant or secure solution, I'm interested.

提交回复
热议问题