puppet-snap
Table of Contents
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with snap
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- License and Author
Module Description
This module installs Snap and core
snap package. Also it provides a package provider, named snap
, which uses
the Snapd REST API for managing snaps.
Setup
What Snap Affects
- the snapd package
- the core snap package
- the snapd daemon
Beginning with snap
To install Snap and the core package:
include snap
If you are using a RedHat family OS you need to additionally install puppet-epel module or manage the EPEL repository on your own.
If you don't want puppet-snap to manage EPEL:
class { 'snap':
manage_repo => false,
}
Usage
This module also provides a package provider for installing and managing snaps.
To install a snap:
package { 'hello-world':
ensure => installed,
provider => 'snap',
}
To uninstall a snap:
package { 'hello-world':
ensure => absent,
provider => 'snap',
}
To purge a snap (warning purging will remove all snap data):
package { 'hello-world':
ensure => purged,
provider => 'snap',
}
To install from specific channel:
package { 'hello-world':
ensure => 'beta',
provider => 'snap',
}
If you want to install a snap in classic mode:
package { 'hello-world':
ensure => installed,
provider => 'snap',
install_options => ['classic'],
}
Same applies for options jailmode
and devmode
This snippet
package { 'hello-world':
ensure => latest,
provider => 'snap',
install_options => ['classic'],
}
installs by default the latest/stable
channel
Reference
See REFERENCE
Limitations
This module has been tested on the OSes listed in metadata.json
Development
See CONTRIBUTING
License and Author
This module was originally written by Christos Papageorgiou (root-expert). It's licensed under Apache 2.0.