Forge Home

snap

Puppet module for installing Snap and managing snap packages.

4,613 downloads

68 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 1.1.1 (latest)
  • 1.1.0
  • 1.0.0
released Apr 27th 2024
This version is compatible with:
  • Puppet Enterprise 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x
  • Puppet >= 6.1.0 < 8.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rootexpert-snap', '1.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rootexpert-snap
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rootexpert-snap --version 1.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

rootexpert/snap — version 1.1.1 Apr 27th 2024

puppet-snap

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs Apache-2 License

Table of Contents

  1. Module Description - What the module does and why it is useful
  2. Setup - The basics of getting started with snap
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module
  7. 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          => installed,
  provider        => 'snap',
  install_options => ['channel=beta'],
}

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

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.