1/7/2024 0 Comments Multipass pluginThe type of connection to the host is specified by the ansible_connection value, which is SSH.There is one host in this Ansible inventory file – multipassvm1.In the AnsibleMultipass directory, create a file named “multipass-vm-inventory.yml” with the following contents: all:Īnsible_ssh_common_args: "-o StrictHostKe圜hecking=no -o ControlMaster=no -o ControlPath=none" The example of this article has a very small infrastructure which consists of just one single virtual machine. In my case, the IP is 192.168.64.20.Īn Ansible inventory tells Ansible how to connect to one or more nodes in the infrastructure. This can be accomplished using, for instance, the multipass list command in a terminal window. Find the IP address of the Multipass VM with key-based authentication.Start the Multipass VM that has key-based authentication. This key-file were created as part of creating the Multipass VM in the previous article. Copy the private key file, named “user_key”, to the new directory.I’ll call my directory “AnsibleMultipass”. Create a directory to hold the files of the example in this article.Preparations for the example of this article are as follows: Instructions on how to install Ansible can be found in the official Ansible documentation. Note where the file containing the private key is stored. PrerequisitesĪ Multipass virtual machine should be created according to instructions in the article Multipass Key-Based Authentication. In this article I will show how to set up an An sible inventory that makes it possible for Ansible to interact with a Multipass virtual machine.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |