theko2fi.multipass.multipass_config_get module – Get Multipass configuration setting
Note
This module is part of the theko2fi.multipass collection (version 0.3.0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install theko2fi.multipass
.
To use it in a playbook, specify: theko2fi.multipass.multipass_config_get
.
New in theko2fi.multipass 0.2.0
Synopsis
Get the configuration setting corresponding to the given key, or all settings if no key is specified.
Essentially returns the output of
multipass get <key>
command
Parameters
Parameter |
Comments |
---|---|
Path to the setting whose configured value should be obtained. This key takes the form of a dot-separated path in a hierarchical settings tree |
Notes
Note
Support for multiple keys and wildcards coming…
Examples
- name: Get the driver used by Multipass on the host
theko2fi.multipass.multipass_config_get:
key: local.driver
register: output
- name: Print the driver information
ansible.builtin.debug:
var: output.result
- name: Get the disk size of a virtual machine
# 'foo' is the name of the virtual machine
theko2fi.multipass.multipass_config_get:
key: local.foo.disk
register: foo_disk_size
- name: Print the disk size
ansible.builtin.debug:
msg: foo virtual machine disk size is: "{{foo_disk_size.result}}"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
Facts representing the value of a single setting specified by the Matches the Returned: always |