Skip to content

Instantly share code, notes, and snippets.

@tabrez
Created October 28, 2022 10:21
Show Gist options
  • Save tabrez/e1c97adfb90ffc23917110b8690cd604 to your computer and use it in GitHub Desktop.
Save tabrez/e1c97adfb90ffc23917110b8690cd604 to your computer and use it in GitHub Desktop.
# https://www.ivankrizsan.se/2021/05/16/ansible-and-multipass-virtual-machines/
all:
hosts:
multipassvm1:
ansible_connection: ssh
ansible_user: ubuntu
ansible_host: <ip of multipass vm>
ansible_ssh_common_args: "-o StrictHostKeyChecking=no -o ControlMaster=no -o ControlPath=none"
ansible_private_key: /var/snap/multipass/common/data/multipassd/ssh-keys/id_rsa
# or copy your public ssh key to vm and use:
# ansible_private_key: /home/$USER/.ssh/id_rsa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment