Connecting over ssh with a password from facts

Hi,

Is it possible to connect over ssh using a password retrieved from facts?

The cloud provider I'm using doesn't (yet) allow creating new VMs with an SSH key already baked in (you can create templates but it isn't really worth it for one-off VMs).

After creating the VM I can get the root password but I'm not sure how to use it from inside Ansible.

I'd like to say, e.g.:

  - add_host: name=new_vm ansible_ssh_host={{ new_vm.ip }} ansible_ssh_password={{ new_vm.password }}

or equivalent.

Any pointers?

Best regards,
  Grzegorz Nosek

It should be ansible_ssh_pass instead of ansible_ssh_password.

With that switch everything should work.