community.general.snap_alias module – Manages snap aliases
Note
This module is part of the community.general collection (version 9.5.1).
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.snap_alias
.
New in community.general 4.0.0
Synopsis
Manages snaps aliases.
Parameters
Parameter |
Comments |
---|---|
Aliases to be created or removed. |
|
Name of the snap. |
|
Desired state of the alias. Choices:
|
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: full |
Will return details on what has changed (or possibly needs changing in |
See Also
See also
- community.general.snap
Manages snaps.
Examples
# Install "foo" and "bar" snap
- name: Create snap alias
community.general.snap_alias:
name: hello-world
alias: hw
- name: Create multiple aliases
community.general.snap_alias:
name: hello-world
aliases:
- hw
- hw2
- hw3
state: present # optional
- name: Remove one specific aliases
community.general.snap_alias:
name: hw
state: absent
- name: Remove all aliases for snap
community.general.snap_alias:
name: hello-world
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The snap aliases after execution. If called in check mode, then the list represents the state before execution. Returned: always |