Created
October 28, 2022 10:21
-
-
Save tabrez/e1c97adfb90ffc23917110b8690cd604 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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