mspackages
Version information
This version is compatible with:
- Puppet Enterprise 2025.6.x, 2025.5.x, 2025.4.x, 2025.3.x, 2025.2.x, 2025.1.x, 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 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, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0
- CentOS,RedHat,Ubuntu,Debian
Start using this module
Add this module to your Puppetfile:
mod 'aitalian-mspackages', '1.0.0'Learn more about managing modules with a PuppetfileDocumentation
mspackages
A Puppet Module that makes it easy to include Microsoft packages for Linux operating systems.
Available on PuppetForge.
Table of Contents
Description
This module adds the Linux Software Repository for Microsoft Products based on distribution, and then installs the given package(s) with the environment variable ACCEPT_EULA=Y set.
Installing Microsoft packages introduces an interactive EULA acceptance prompt; since Puppet runs are non-interactive, an environment variable can be set to implicitly accept the EULA and bypass the prompt. This is possible by using a new resource type introduced with this module: mspackages. Traditional usage of Puppet's package resource type does not support passing environment variables (for reference, see PUP-1526 where this request is outstanding).
This module was developed specifically to install the Microsoft ODBC Driver for SQL Server on Linux, which prompts to accept the EULA, however, any package available for the target distribution is supported.
Disclaimer: You are responsible for reviewing the EULA applicable to the software you are agreeing to install.
Requirements
- Puppet
>= 4.1.0or Puppet Enterprise>= 2016.4.x puppetlabs/stdlib(>= 4.13.0)puppetlabs/apt>= 2.3.0for Debian-based distributionspuppetlabs/yumrepo_core>= 1.0.0for RedHat-based distributions- Linux OS: RedHat, CentOS, Debian, Ubuntu
For complete up-to-date requirements, see metadata.json.
Usage
To begin, you first need to include the module in your Puppetfile and run Bolt, r10k or Code Manager, or, install it manually using the Puppet module tool.
Once installed, you can include packages either by defining resources within a manifest or hiera configuration file, and then apply it.
manifest.ppexample:
# Add the required Microsoft Packages Repo and
# Install the Linux Microsoft ODBC Driver for MS SQL Server.
mspackages { 'msodbcsql17':
ensure => present,
}
or to remove packages:
mspackages { 'msodbcsql17':
ensure => absent,
}
On a standalone Debian-based system, you can apply this using a local manifest and Puppet Bolt:
$ cat > Puppetfile << EOF
mod 'puppetlabs/stdlib'
mod 'puppetlabs/apt'
mod 'aitalian/mspackages'
EOF
$ cat > manifest.pp << EOF
mspackages { 'msodbcsql17':
ensure => present,
}
EOF
$ bolt puppetfile install --puppetfile ./Puppetfile
$ puppet apply --modulepath=~/.puppetlabs/bolt/modules manifest.pp
hieradata.yamlexample: For node-specific configurations, ensure yourmanifest.ppincludeshiera_include('classes'). You can then update your node configuration as follows:
classes:
- 'mspackages::install'
mspackages::install::packages:
- 'msodbcsql17'
- 'mssql-tools'
or to remove packages:
mspackages::remove::packages:
- 'mssql-tools'
Development
Pull requests are welcome via GitHub. Additional distribution compatibility can be added in both repository.pp and package.pp. This module was built using the Puppet Development Kit (PDK).
Changelog
1.0.0: 2021-07-27
- On Ubuntu
>= 21.04the20.10repository is forcibly used until more packages are available - Added RHEL 8 support
- Upgraded PDK version from
1.18.0to2.1.1 - Renamed
masterbranch tomain
0.1.1: 2020-06-03
- Added support for Debian and Ubuntu
- NOTE: On Ubuntu
>= 20.04the19.10repository is forcibly used until more packages are available (potentially July/August 2020)
- NOTE: On Ubuntu
- Upgraded PDK version from
1.10.0to1.18.0 - Updated
metadata.jsonrequirements and included project/issue URLs - GitLab CI now builds releases using the official
puppet-dev-toolsimage
0.1.0: 2019-05-03
- Initial release
- Only compatible with RHEL (RedHat/CentOS) 6/7
Dependencies
- puppetlabs/stdlib (>= 4.13.0)
- puppetlabs/yumrepo_core (>= 1.0.0)
- puppetlabs/apt (>= 2.3.0)