msftrepo
Version information
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
- Puppet >= 6.21.0 < 8.0.0
- , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'visus-msftrepo', '0.1.5'
Learn more about managing modules with a PuppetfileDocumentation
msftrepo
The msftrepo module installs Microsoft repository sources that in turn enable installation of Powershell and .NET Core via a package manager.
Table of Contents
- Description
- Setup – The basics of getting started with msftrepo
- Usage – Configuration options and additional functionality
- Limitations
- Development - Guide for contributing to the module
Description
This module installs the Microsoft production repository to RedHat or Debian systems, which provides packages like Powershell and .NET Core.
Setup
Setup Requirements
This module requires puppet-yum
and puppetlabs-apt
being installed.
Beginning with msftrepo
Just add include msftrepo
to add all configured repositories at their default
location.
Usage
If desired, details of the installed repositories should be changed via Hiera.
The following global Hiera settings affect all repositories:
Name | Description | Default |
---|---|---|
msftrepo::repo_dir |
The path where the repository files are installed. | undef |
msftrepo::repo_owner |
The user name or UID of the user owning the repository file. | 0 |
msftrepo::repo_group |
The name or UID of the group owning the repository file. | 0 |
msftrepo::key_dir |
The directory where the key should be installed on RedHat-based systems. | /etc/pki/rpm-gpg |
msftrepo::key_prefix |
A prefix added to the name of the key files before the repository title. | RPM-GPG-KEY- |
The repositories are stored in the hash msftrepo::repos
. Each of the repositories has the following parameters:
Name | Description | Default |
---|---|---|
repo_src |
The URL where the repository definition is downloaded from. | OS-dependent |
key_id |
The ID of the GPG key used with the repository. | 0xEB3E94ADBE1229CF |
key_src |
The URL where the GPG key is downloaded from. | https://packages.microsoft.com/keys/microsoft.asc |
Limitations
Only the distributions listed in metadata.json
are supported.
Development
Open a pull request on GitHub.
Reference
Table of Contents
Classes
msftrepo
: Installs the Microsoft package repositories.
Defined types
msftrepo::repo
: (Un-) Installs a repository along with its GPG key.
Classes
msftrepo
This module installs public Microsoft package repositories containing packages like Powershell and .NET Core. At the moment, this module only installs the Microsoft production repository.
Examples
Include all known repositories with default configurations.
include msftrepo
Parameters
The following parameters are available in the msftrepo
class:
repo_dir
Data type: Optional[String]
The directory where to install the repository file, ie "/etc/yum.repos.d" for RedHat-based systems. If not present, the module derives the path by itself.
Default value: undef
repo_owner
Data type: Variant[String, Integer]
The name or UID of the owning user of the repository file. This parameter defaults to 0 (or "root").
Default value: 0
repo_group
Data type: Variant[String, Integer]
The name or UID of the owning group of the repository file. This parameter defaults to 0 (or "root").
Default value: 0
key_dir
Data type: String
The directory where the key should be installed. This is only used on RedHat-based systems and defaults to "/etc/pki/rpm-gpg".
Default value: '/etc/pki/rpm-gpg'
key_prefix
Data type: String
An additional prefix string that is added before the name of the key file. This is only used on RedHat-based systems and defaults to "RPM-GPG-KEY-".
Default value: 'RPM-GPG-KEY-'
repos
Data type: Hash[String, Hash[String, Variant[String, Integer, Boolean]]]
The repositories that are being installed. The keys are the names used for the individual repository files, which must be unique. The values are a hash holding the parameters passed the defined type "repo". This parameter is filled from Hiera.
Default value: {}
Defined types
msftrepo::repo
This is a utility type that is used by the msftrepo class. It is not intended for direct use by end users.
Parameters
The following parameters are available in the msftrepo::repo
defined type:
repo_src
Data type: String
The URL of the repositoy definition, ie the file to be copied to "/etc/yum.repos.d".
repo_dir
Data type: String
The directory where to install the repository file, ie "/etc/yum.repos.d" for RedHat-based systems.
repo_owner
Data type: Variant[String, Integer]
The name or UID of the owning user of the repository file.
repo_group
Data type: Variant[String, Integer]
The name or UID of the owning group of the repository file.
key_id
Data type: String
The ID of the GPG key used by the repository.
key_src
Data type: String
The URL of the GPG key to be installed.
key_dir
Data type: String
The directory where the key should be installed. This is only used on RedHat-based systems.
key_prefix
Data type: String
An additional prefix string that is added before the name of the key file. This is only used on RedHat-based systems.
ensure
Data type: String
Determines whether the repository should be present or absent. This defaults to "present".
Default value: present
Changelog
All notable changes to this project will be documented in this file.
Release 0.1.0
Initial version of the module with support for the Microsoft production repository on RedHat and Debian distributions.
Release 0.1.1
Fixed issue with formatting of the documentation.
Release 0.1.2
Updated reference documentation.
Release 0.1.5
Update repository source for RHEL 9.