Note
This module is part of the community.general collection (version 10.7.3).
You might already have this collection installed if you are using the ansible package. 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 community.general.
To use it in a playbook, specify: community.general.gio_mime.
New in community.general 7.5.0
Parameter | Comments |
|---|---|
handler string / required | Default handler set for the MIME type. |
mime_type string / required | MIME type for which a default handler is set. |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: full | Will return details on what has changed (or possibly needs changing in |
Note
gio mime command (and subcommand).See also
Manual page for the command.
Reference documentation for the GIO API..
- name: Set chrome as the default handler for https
community.general.gio_mime:
mime_type: x-scheme-handler/https
handler: google-chrome.desktop
register: result
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
handler string | The handler set as default. Returned: success Sample: |
version string added in community.general 10.0.0 | Version of gio. Returned: always Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/gio_mime_module.html