Compare commits
10 Commits
master
...
circleci-p
Author | SHA1 | Date | |
---|---|---|---|
|
20144b511d | ||
|
e9b327cc0c | ||
|
a72f539c23 | ||
|
c8fa6599ff | ||
|
eba85e08df | ||
|
6d478b124c | ||
|
c06708dc91 | ||
|
e24a9aa89a | ||
|
bd5fbd4cc6 | ||
|
418a817b70 |
30
.circleci/config.yml
Normal file
30
.circleci/config.yml
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
version: 2.1
|
||||||
|
|
||||||
|
orbs:
|
||||||
|
ruby: circleci/ruby@1.1.0
|
||||||
|
node: circleci/node@2
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verif:
|
||||||
|
docker:
|
||||||
|
- image: cimg/ruby:2.7-node
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run :
|
||||||
|
name: prerequisites
|
||||||
|
command: bundle install
|
||||||
|
- run:
|
||||||
|
name: verif_lint
|
||||||
|
command: bundle exec rake validate lint
|
||||||
|
- run:
|
||||||
|
name: verif_parser
|
||||||
|
command: puppet parser validate manifests/init.pp
|
||||||
|
- run:
|
||||||
|
name: woot
|
||||||
|
command: bundle exec rake spec
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
verif:
|
||||||
|
jobs:
|
||||||
|
- verif
|
@ -13,18 +13,14 @@ https://github.com/microsoft/vscode-dev-containers/tree/v0.140.1/containers/pupp
|
|||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
// Set *default* container specific settings.json values on container create.
|
||||||
"settings": {
|
"settings": {
|
||||||
"terminal.integrated.profiles.linux": {
|
"terminal.integrated.shell.linux": "/bin/bash"
|
||||||
"bash": {
|
|
||||||
"path": "bash",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"puppet.puppet-vscode",
|
"puppet.puppet-vscode",
|
||||||
"rebornix.Ruby"
|
"rebornix.Ruby"
|
||||||
],
|
]
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [],
|
"forwardPorts": [],
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"settings": {
|
"settings": {
|
||||||
"terminal.integrated.profiles.linux": {
|
"terminal.integrated.profiles.linux": {
|
||||||
"bash": {
|
"bash": {
|
||||||
"path": "bash"
|
"path": "bash",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -3,6 +3,4 @@
|
|||||||
---
|
---
|
||||||
fixtures:
|
fixtures:
|
||||||
forge_modules:
|
forge_modules:
|
||||||
stdlib:
|
# stdlib: "puppetlabs/stdlib"
|
||||||
repo: "puppetlabs/stdlib"
|
|
||||||
ref: "6.0.0"
|
|
||||||
|
@ -4,7 +4,7 @@ require:
|
|||||||
- rubocop-rspec
|
- rubocop-rspec
|
||||||
AllCops:
|
AllCops:
|
||||||
DisplayCopNames: true
|
DisplayCopNames: true
|
||||||
TargetRubyVersion: '2.5'
|
TargetRubyVersion: '2.4'
|
||||||
Include:
|
Include:
|
||||||
- "**/*.rb"
|
- "**/*.rb"
|
||||||
Exclude:
|
Exclude:
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"puppet.editorService.puppet.version": "7.23.0"
|
|
||||||
}
|
|
@ -2,13 +2,7 @@
|
|||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
## 0.4.3 (2021-11-07)
|
## 0.4.2 (2021-05-11)
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- Add support for RedHat RHEL in the metadata
|
|
||||||
|
|
||||||
## 0.4.2 (2021-11-05)
|
|
||||||
|
|
||||||
### Addition
|
### Addition
|
||||||
|
|
||||||
|
34
Gemfile
34
Gemfile
@ -13,31 +13,21 @@ def location_for(place_or_version, fake_version = nil)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
|
||||||
|
minor_version = ruby_version_segments[0..1].join('.')
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
||||||
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 3.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
||||||
gem "json", '= 2.5.1', require: false if Gem::Requirement.create(['>= 3.0.0', '< 3.0.5']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
gem "json", '= 2.3.0', require: false if Gem::Requirement.create(['>= 2.7.0', '< 2.8.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
||||||
gem "json", '= 2.6.1', require: false if Gem::Requirement.create(['>= 3.1.0', '< 3.1.3']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
gem "puppet-module-posix-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
|
||||||
gem "json", '= 2.6.3', require: false if Gem::Requirement.create(['>= 3.2.0', '< 4.0.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
|
gem "puppet-module-posix-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
|
||||||
gem "voxpupuli-puppet-lint-plugins", '~> 4.0', require: false
|
gem "puppet-module-win-default-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||||
gem "facterdb", '~> 1.18', require: false
|
gem "puppet-module-win-dev-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||||
gem "metadata-json-lint", '>= 2.0.2', '< 4.0.0', require: false
|
|
||||||
gem "puppetlabs_spec_helper", '~> 5.0', require: false
|
|
||||||
gem "rspec-puppet-facts", '~> 2.0', require: false
|
|
||||||
gem "codecov", '~> 0.2', require: false
|
|
||||||
gem "dependency_checker", '~> 0.2', require: false
|
|
||||||
gem "parallel_tests", '= 3.12.1', require: false
|
|
||||||
gem "pry", '~> 0.10', require: false
|
|
||||||
gem "simplecov-console", '~> 0.5', require: false
|
|
||||||
gem "puppet-debugger", '~> 1.0', require: false
|
|
||||||
gem "rubocop", '= 1.6.1', require: false
|
|
||||||
gem "rubocop-performance", '= 1.9.1', require: false
|
|
||||||
gem "rubocop-rspec", '= 2.0.1', require: false
|
|
||||||
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
|
||||||
end
|
end
|
||||||
group :system_tests do
|
group :system_tests do
|
||||||
gem "puppet_litmus", '< 1.0.0', require: false, platforms: [:ruby, :x64_mingw]
|
gem "puppet-module-posix-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:ruby]
|
||||||
gem "serverspec", '~> 2.41', require: false
|
gem "puppet-module-win-system-r#{minor_version}", '~> 1.0', require: false, platforms: [:mswin, :mingw, :x64_mingw]
|
||||||
end
|
end
|
||||||
|
|
||||||
puppet_version = ENV['PUPPET_GEM_VERSION']
|
puppet_version = ENV['PUPPET_GEM_VERSION']
|
||||||
|
@ -2,8 +2,10 @@
|
|||||||
#
|
#
|
||||||
# Manages the nslcd server configuration file
|
# Manages the nslcd server configuration file
|
||||||
#
|
#
|
||||||
class nslcd::config inherits nslcd {
|
class nslcd::config inherits nslcd
|
||||||
file {
|
{
|
||||||
|
file
|
||||||
|
{
|
||||||
$nslcd::config:
|
$nslcd::config:
|
||||||
ensure => file,
|
ensure => file,
|
||||||
owner => $nslcd::config_user,
|
owner => $nslcd::config_user,
|
||||||
@ -11,4 +13,4 @@ class nslcd::config inherits nslcd {
|
|||||||
mode => $nslcd::config_mode,
|
mode => $nslcd::config_mode,
|
||||||
content => template('nslcd/nslcd.erb'),
|
content => template('nslcd/nslcd.erb'),
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -98,7 +98,8 @@
|
|||||||
# Sets the time after which the LDAP server is considered to be permanently unavailable.
|
# Sets the time after which the LDAP server is considered to be permanently unavailable.
|
||||||
# Once this time is reached retries will be done only once per this time period.
|
# Once this time is reached retries will be done only once per this time period.
|
||||||
#
|
#
|
||||||
class nslcd (
|
class nslcd
|
||||||
|
(
|
||||||
Variant[Boolean,String[1]] $package_ensure = 'present',
|
Variant[Boolean,String[1]] $package_ensure = 'present',
|
||||||
String[1] $package_name = $nslcd::params::package_name,
|
String[1] $package_name = $nslcd::params::package_name,
|
||||||
Boolean $package_manage = true,
|
Boolean $package_manage = true,
|
||||||
@ -108,7 +109,7 @@ class nslcd (
|
|||||||
Boolean $service_manage = true,
|
Boolean $service_manage = true,
|
||||||
String[1] $uid = 'nslcd',
|
String[1] $uid = 'nslcd',
|
||||||
String[1] $gid = $nslcd::params::gid,
|
String[1] $gid = $nslcd::params::gid,
|
||||||
Stdlib::Unixpath $config = $nslcd::params::config,
|
Stdlib::Unixpath $config = '/etc/nslcd.conf',
|
||||||
String[1] $config_user = 'root',
|
String[1] $config_user = 'root',
|
||||||
String[1] $config_group = $nslcd::params::config_group,
|
String[1] $config_group = $nslcd::params::config_group,
|
||||||
Stdlib::Filemode $config_mode = $nslcd::params::config_mode,
|
Stdlib::Filemode $config_mode = $nslcd::params::config_mode,
|
||||||
@ -130,7 +131,9 @@ class nslcd (
|
|||||||
Optional[Integer] $idle_timelimit = undef,
|
Optional[Integer] $idle_timelimit = undef,
|
||||||
Integer $reconnect_sleeptime = 1,
|
Integer $reconnect_sleeptime = 1,
|
||||||
Integer $reconnect_retrytime = 10,
|
Integer $reconnect_retrytime = 10,
|
||||||
) inherits nslcd::params {
|
)
|
||||||
|
inherits nslcd::params
|
||||||
|
{
|
||||||
contain nslcd::install
|
contain nslcd::install
|
||||||
contain nslcd::config
|
contain nslcd::config
|
||||||
contain nslcd::service
|
contain nslcd::service
|
||||||
|
@ -2,10 +2,14 @@
|
|||||||
#
|
#
|
||||||
# Installs the nslcd package.
|
# Installs the nslcd package.
|
||||||
#
|
#
|
||||||
class nslcd::install inherits nslcd {
|
class nslcd::install inherits nslcd
|
||||||
if $nslcd::package_manage {
|
{
|
||||||
package { $nslcd::package_name:
|
if $nslcd::package_manage
|
||||||
ensure => $nslcd::package_ensure,
|
{
|
||||||
|
package
|
||||||
|
{
|
||||||
|
$nslcd::package_name:
|
||||||
|
ensure => $nslcd::package_ensure,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,31 +2,27 @@
|
|||||||
#
|
#
|
||||||
# Sets the default parameters for the nslcd class.
|
# Sets the default parameters for the nslcd class.
|
||||||
#
|
#
|
||||||
class nslcd::params {
|
class nslcd::params
|
||||||
case $facts['os']['family'] {
|
{
|
||||||
'Debian': {
|
case $::osfamily
|
||||||
|
{
|
||||||
|
'Debian':
|
||||||
|
{
|
||||||
$package_name = 'nslcd'
|
$package_name = 'nslcd'
|
||||||
$gid = 'nslcd'
|
$gid = 'nslcd'
|
||||||
$config = '/etc/nslcd.conf'
|
|
||||||
$config_group = 'nslcd'
|
$config_group = 'nslcd'
|
||||||
$config_mode = '0640'
|
$config_mode = '0640'
|
||||||
}
|
}
|
||||||
'RedHat': {
|
'RedHat':
|
||||||
|
{
|
||||||
$package_name = 'nss-pam-ldapd'
|
$package_name = 'nss-pam-ldapd'
|
||||||
$gid = 'ldap'
|
$gid = 'ldap'
|
||||||
$config = '/etc/nslcd.conf'
|
|
||||||
$config_group = 'root'
|
$config_group = 'root'
|
||||||
$config_mode = '0600'
|
$config_mode = '0600'
|
||||||
}
|
}
|
||||||
'FreeBSD': {
|
default:
|
||||||
$package_name = 'nss-pam-ldapd'
|
{
|
||||||
$gid = 'nslcd'
|
fail("The ${module_name} module is not supported on an ${::osfamily} based system.")
|
||||||
$config = '/usr/local/etc/nslcd.conf'
|
|
||||||
$config_group = 'wheel'
|
|
||||||
$config_mode = '0600'
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("The ${module_name} module is not supported on an ${facts['os']['family']} based system.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,12 +2,16 @@
|
|||||||
#
|
#
|
||||||
# Manages the nslcd service.
|
# Manages the nslcd service.
|
||||||
#
|
#
|
||||||
class nslcd::service inherits nslcd {
|
class nslcd::service inherits nslcd
|
||||||
if $nslcd::service_manage {
|
{
|
||||||
service { 'nslcd':
|
if $nslcd::service_manage
|
||||||
ensure => $nslcd::service_ensure,
|
{
|
||||||
enable => $nslcd::service_enable,
|
service
|
||||||
name => $nslcd::service_name,
|
{
|
||||||
|
'nslcd':
|
||||||
|
ensure => $nslcd::service_ensure,
|
||||||
|
enable => $nslcd::service_enable,
|
||||||
|
name => $nslcd::service_name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "ascendings-nslcd",
|
"name": "geekix-nslcd",
|
||||||
"version": "0.5.1",
|
"version": "0.4.2",
|
||||||
"author": "ascendings",
|
"author": "geekix",
|
||||||
"summary": "Installs and configures nslcd.",
|
"summary": "Installs and configures nslcd.",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"source": "https://git.metaunix.net/Metaunix/puppet-nslcd",
|
"source": "https://github.com/geekix/puppet-nslcd",
|
||||||
"project_page": "https://git.metaunix.net/Metaunix/puppet-nslcd",
|
"project_page": "https://github.com/geekix/puppet-nslcd",
|
||||||
"issues_url": "https://git.metaunix.net/Metaunix/puppet-nslcd/issues",
|
"issues_url": "https://github.com/geekix/puppet-nslcd/issues",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
{
|
{
|
||||||
"name": "puppetlabs-stdlib",
|
"name": "puppetlabs-stdlib",
|
||||||
"version_requirement": ">= 6.0.0 < 8.5.0"
|
"version_requirement": ">= 4.0.0 < 8.1.0"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"operatingsystem_support": [
|
"operatingsystem_support": [
|
||||||
@ -31,16 +31,6 @@
|
|||||||
"18.04",
|
"18.04",
|
||||||
"20.04"
|
"20.04"
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"operatingsystem": "RedHat",
|
|
||||||
"operatingsystemrelease": [
|
|
||||||
"7",
|
|
||||||
"8"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operatingsystem": "FreeBSD"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
@ -56,7 +46,7 @@
|
|||||||
"ldap",
|
"ldap",
|
||||||
"authentication"
|
"authentication"
|
||||||
],
|
],
|
||||||
"pdk-version": "2.7.1",
|
"pdk-version": "2.2.0",
|
||||||
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
|
"template-url": "https://github.com/puppetlabs/pdk-templates#main",
|
||||||
"template-ref": "heads/main-0-gc6d4446"
|
"template-ref": "tags/2.3.0-0-g8aaceff"
|
||||||
}
|
}
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'nslcd::config' do
|
|
||||||
on_supported_os.each do |os, os_facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) { os_facts }
|
|
||||||
|
|
||||||
it { is_expected.to compile.with_all_deps }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'nslcd::install' do
|
|
||||||
on_supported_os.each do |os, os_facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) { os_facts }
|
|
||||||
|
|
||||||
it { is_expected.to compile.with_all_deps }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'nslcd' do
|
|
||||||
on_supported_os.each do |os, os_facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) { os_facts }
|
|
||||||
|
|
||||||
it { is_expected.to compile.with_all_deps }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'nslcd::params' do
|
|
||||||
on_supported_os.each do |os, os_facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) { os_facts }
|
|
||||||
|
|
||||||
it { is_expected.to compile.with_all_deps }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'nslcd::service' do
|
|
||||||
on_supported_os.each do |os, os_facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let(:facts) { os_facts }
|
|
||||||
|
|
||||||
it { is_expected.to compile.with_all_deps }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user