Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centralize fixes incuding PBIS Enterprise support back upstream. Also: Tested against PBIS 8.5 #15

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
778a82e
Ignoring .project
Nov 11, 2014
1b280a5
Getting module metatdata in
Nov 11, 2014
8b1bcb6
Adding a package option
Nov 11, 2014
4f22213
Try skipping the OU conversion
Nov 11, 2014
526a295
Better check command
Nov 11, 2014
de05ad4
Use full path
Nov 11, 2014
8357f69
Little bit of cleanup
Nov 11, 2014
f991f70
Returning uo_path
Nov 11, 2014
ba153cb
Adding service name var back
Nov 11, 2014
2ef0f77
Hopefully fixing an issue with configs
Nov 11, 2014
d931d93
Adding a few more options to pbis.conf template
Nov 11, 2014
be21bc9
Opp, shouldn't have been variables!
Nov 11, 2014
703956d
Changing the domain join exec to try and get on domain detection working
Nov 17, 2014
a42f522
Change back to using old exec unless on domain join
Nov 17, 2014
02e6b3e
Adding fact to get domain's DNS name
Nov 17, 2014
90ae47d
Correcting doc at begining of fact
Nov 17, 2014
48a9093
Adding NetBIOS Domain Name fact
Nov 17, 2014
8c6142e
Correcting doc
Nov 17, 2014
a2a6e75
Adding domain SID fact
Nov 17, 2014
8055226
Addign SAM account name fact
Nov 17, 2014
2d1eafd
Adding refreshonly to update-dns exec, and it should only run when first
Nov 18, 2014
baf3782
Fixed the OU parameter to join domains to support space in OU names a…
etlweather Feb 1, 2015
5030beb
Merge pull request #1 from etlweather/master
woodsbw Feb 2, 2015
90e62d9
Fixed issue with selectors using fail() function
Feb 18, 2015
a30e912
Modified file resource to follow symlinks.
Feb 19, 2015
4b986b1
Forcing the existence of opt in case it isn't already there.
Feb 19, 2015
61333b7
Allow for pbis-open-upgrade package dependency
Feb 19, 2015
c8bd3ef
Fixed a few mistakes; configured support for upgrade package.
Feb 19, 2015
3420c40
Modified default params to match default settings in PBIS
Feb 19, 2015
f412f34
adding update dns options
DrOwl Aug 25, 2015
19495b2
start clean up with puppet lint
Aug 25, 2015
06601fc
Correcion de template
Aug 7, 2016
ed1e5e0
Add contac dependencies
Aug 11, 2016
4ada2c0
Fix Facters
Aug 11, 2016
05cd0fd
Download rpm, use wget module
Aug 15, 2016
8e81917
Reeplazo de rpm por sh installer, y usa systemd para el servicio lwsmd
Aug 20, 2016
47b0f40
Correncion de verificacion de instalacion
Sep 28, 2016
d185bf1
Agregado de path para installar pbis
Sep 29, 2016
65db7a9
correccion del template para memberof
Sep 29, 2016
024525c
Add yum repo installations.
docsmooth Nov 17, 2016
5659b34
update instructions for new yum procedure
docsmooth Nov 17, 2016
4234971
Merge pull request #1 from docsmooth/master
psyreactor Nov 22, 2016
451a321
Merge pull request #1 from psyreactor/master
docsmooth Nov 29, 2016
4a49597
add sync_system_time value to conf and domainjoin settings
docsmooth Apr 11, 2017
47f2822
add some logging
docsmooth Apr 11, 2017
e56b5e6
adding debug logging
docsmooth Apr 11, 2017
e081980
bugfix, add comment about requirements in facter/domain_dns_name. Add
docsmooth Apr 11, 2017
756d09c
fix up to default to open
docsmooth Apr 11, 2017
cc6b6c9
fix up OU path to the easier-to-user format and version in README
docsmooth Apr 11, 2017
0ddcf54
update version for release
docsmooth Jul 12, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
fixtures:
forge_modules:
concat:
repo: "puppetlabs/concat"
wget:
repo: "maestrodev/wget"
symlinks:
pbis: "#{source_dir}"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/.project
.kitchen/
.kitchen.local.yml
chefignore
.tmp/
.librarian/
.idea/
modules/

35 changes: 35 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
provisioner:
name: puppet_apply
files_path: files
manifests_path: test/integration

driver:
name: docker
docker: /usr/bin/docker
use_sudo: false
privileged: true
cap_add: SYS_ADMIN
run_command: /usr/sbin/init

platforms:
- name: centos-7
driver_config:
provision_command:
- yum update -y
# Install common dependencies
- yum install -y net-tools tar wget which

suites:
- name: rhel
provisioner:
puppet_verbose: true
puppet_debug: true
require_puppet_collections: true
ruby_bindir: /usr/bin/ruby
require_chef_for_busser: false
puppet_yum_collections_repo: https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm
manifest: pbis/init.pp
modules_path: modules
includes:
- centos-7
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Ben Webber
Philip B Chase
Lucas Mariani
16 changes: 16 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
source 'https://rubygems.org'

gem 'puppet'
gem 'rspec'
gem 'rspec-puppet'
# , :git => 'https://github.com/rodjek/rspec-puppet.git'
gem 'puppet-lint'
gem 'puppetlabs_spec_helper'
gem 'serverspec'
gem 'kitchen-docker'
gem 'kitchen-puppet'
gem 'kitchen-vagrant'
gem 'librarian-puppet'
gem 'test-kitchen'
gem 'winrm-transport'
gem 'librarian-puppet'
157 changes: 157 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
GEM
remote: https://rubygems.org/
specs:
artifactory (2.3.3)
builder (3.2.2)
diff-lcs (1.2.5)
facter (2.4.6)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.0)
faraday (>= 0.7.4, < 0.10)
fast_gettext (1.1.0)
ffi (1.9.14)
gettext (3.2.2)
locale (>= 2.0.5)
text (>= 1.3.0)
gettext-setup (0.6)
fast_gettext (~> 1.1.0)
gettext (>= 3.0.2)
gssapi (1.2.0)
ffi (>= 1.0.1)
gyoku (1.3.1)
builder (>= 2.1.2)
hiera (3.2.0)
json_pure
httpclient (2.8.1)
json_pure (2.0.2)
kitchen-docker (2.5.0)
test-kitchen (>= 1.0.0)
kitchen-puppet (1.0.37)
net-ssh (~> 2.0)
test-kitchen (~> 1.4)
kitchen-vagrant (0.20.0)
test-kitchen (~> 1.4)
librarian-puppet (2.2.3)
librarianp (>= 0.6.3)
puppet_forge (~> 2.1)
rsync
librarianp (0.6.3)
thor (~> 0.15)
little-plugger (1.1.4)
locale (2.1.2)
logging (2.1.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
metaclass (0.0.4)
minitar (0.5.4)
mixlib-install (1.1.0)
artifactory
mixlib-shellout
mixlib-versioning
mixlib-shellout (2.2.6)
mixlib-versioning (1.1.0)
mocha (1.1.0)
metaclass (~> 0.0.1)
multi_json (1.12.1)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.4)
net-telnet (0.1.1)
nori (2.6.0)
puppet (4.5.3)
facter (> 2.0, < 4)
hiera (>= 2.0, < 4)
json_pure
puppet-lint (2.0.0)
puppet-syntax (2.1.0)
rake
puppet_forge (2.2.2)
faraday (~> 0.9.0)
faraday_middleware (>= 0.9.0, < 0.11.0)
gettext-setup (>= 0.3)
minitar
semantic_puppet (~> 0.1.0)
puppetlabs_spec_helper (1.1.1)
mocha
puppet-lint
puppet-syntax
rake
rspec-puppet
rake (11.2.2)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.2)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-its (1.2.0)
rspec-core (>= 3.0.0)
rspec-expectations (>= 3.0.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-puppet (2.4.0)
rspec
rspec-support (3.5.0)
rsync (1.0.9)
rubyntlm (0.6.0)
rubyzip (1.2.0)
safe_yaml (1.0.4)
semantic_puppet (0.1.4)
gettext-setup (>= 0.3)
serverspec (2.36.0)
multi_json
rspec (~> 3.0)
rspec-its
specinfra (~> 2.53)
sfl (2.2)
specinfra (2.60.3)
net-scp
net-ssh (>= 2.7, < 4.0)
net-telnet
sfl
test-kitchen (1.10.2)
mixlib-install (~> 1.0, >= 1.0.4)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (>= 2.9, < 4.0)
safe_yaml (~> 1.0)
thor (~> 0.18)
text (1.3.1)
thor (0.19.1)
winrm (1.8.1)
builder (>= 2.1.2)
gssapi (~> 1.2)
gyoku (~> 1.0)
httpclient (~> 2.2, >= 2.2.0.2)
logging (>= 1.6.1, < 3.0)
nori (~> 2.0)
rubyntlm (~> 0.6.0)
winrm-transport (1.0.3)
rubyzip (~> 1.1, >= 1.1.7)
winrm (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
kitchen-docker
kitchen-puppet
kitchen-vagrant
librarian-puppet
puppet
puppet-lint
puppetlabs_spec_helper
rspec
rspec-puppet
serverspec
test-kitchen
winrm-transport

BUNDLED WITH
1.12.5
7 changes: 0 additions & 7 deletions Modulefile

This file was deleted.

12 changes: 12 additions & 0 deletions Puppetfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FORGE
remote: https://forgeapi.puppetlabs.com
specs:
maestrodev-wget (1.7.3)
puppetlabs-concat (2.2.0)
puppetlabs-stdlib (< 5.0.0, >= 4.2.0)
puppetlabs-stdlib (4.12.0)

DEPENDENCIES
maestrodev-wget (>= 1.7.3)
puppetlabs-concat (>= 2.2.0)

20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ Joins a node to an Active Directory domain using PowerBroker Identity Services O
ad_domain => 'ads.example.org',
bind_username => 'admin',
bind_password => 'password',
ou => 'ou=Computers,ou=Department,ou=Divison',
ou => 'division/Department/computers',
user_domain_prefix => 'ADS',
require_membership_of => 'ADS\\Linux_Users',
version => "8.5.3-293"
}
}

Expand All @@ -24,7 +25,8 @@ This module supports two ways of distributing the PBIS Open packages:

The default is to use Puppet's built-in fileserver.

In either case, download the necessary packages from the [BeyondTrust website](http://www.beyondtrust.com/Technical-Support/Downloads/PowerBroker-Identity-Services-Open-Edition/?Pass=True). Extract the architecture-specific `pbis-open` `.rpm` or `.deb` file from the self-extracting `sh` archive.
In either case, download the necessary packages from the [BeyondTrust Repo website](https://repo.pbis.beyondtrust.com/).
You can access the x86_64 RPMs directly, for example: (https://repo.pbis.beyondtrust.com/yum/pbiso/x86_64/Packages/)

### Using Puppet's built-in fileserver

Expand All @@ -42,18 +44,11 @@ and place them in the module's `files/` folder.

For scalability, or if you are using variable module paths, you may want to add the PBIS Open packages to a local `apt` or `yum` repository.

In that case, include the class with `use_repository => true`.

node 'workstation' {
class { 'pbis':
...
use_repository => true,
}
}
In that case, sync with the [BeyondTrust Public Repo](https://repo.pbis.beyondtrust.com), and set $yum_install => true (the default)

### Service name change.

The service name may not be 'lsass' on newer version of PBIS and may be 'lwsmd'. This is now configurable as below:
The service name was changed from 'lsass' to 'lwsmd' in Likewise Open 6.0, and therefore all versions of PBIS. This is now configurable as below:

node 'workstation' {
class { 'pbis':
Expand All @@ -65,12 +60,13 @@ The service name may not be 'lsass' on newer version of PBIS and may be 'lwsmd'.
## Dependencies

This module requires the `osfamily` fact, which depends on Facter 1.6.1+.
This module requires the 'wget' module, which you can get via: `puppet module install maestrodev-wget --version 1.7.3`

## Supported platforms

This module has been tested against Puppet 2.7.18+ and Facter 1.6.9+ on Debian 7 and Ubuntu 12.04.

Support for RedHat and Suse is included but has not been tested.
Support for RedHat and Suse is included and has been tested 2016-11-16.

## Contributing

Expand Down
78 changes: 78 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet-syntax/tasks/puppet-syntax'

# These two gems aren't always present, for instance
# on Travis with --without development
begin
require 'puppet_blacksmith/rake_tasks'
rescue LoadError
end

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')


exclude_paths = [
"pkg/**/*",
"vendor/**/*",
"spec/**/*",
"modules/**/*.pp",
]
PuppetLint.configuration.ignore_paths = exclude_paths
PuppetSyntax.exclude_paths = exclude_paths

desc "Run acceptance tests"
RSpec::Core::RakeTask.new(:acceptance) do |t|
t.pattern = 'spec/acceptance'
end

desc "Run syntax, lint, and spec tests."
task :test => [
:syntax,
:lint,
:spec,
]

desc 'Generate pooler nodesets'
task :gen_nodeset do
require 'beaker-hostgenerator'
require 'securerandom'
require 'fileutils'

agent_target = ENV['TEST_TARGET']
if ! agent_target
STDERR.puts 'TEST_TARGET environment variable is not set'
STDERR.puts 'setting to rhel value of "redhat-64default."'
agent_target = 'redhat-64default.'
end

master_target = ENV['MASTER_TEST_TARGET']
if ! master_target
STDERR.puts 'MASTER_TEST_TARGET environment variable is not set'
STDERR.puts 'setting to rhel value of "redhat7-64mdcl"'
master_target = 'redhat7-64mdcl'
end

targets = "#{master_target}-#{agent_target}"
cli = BeakerHostGenerator::CLI.new([targets])
nodeset_dir = "tmp/nodesets"
nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml"
FileUtils.mkdir_p(nodeset_dir)
File.open(nodeset, 'w') do |fh|
fh.print(cli.execute)
end
puts nodeset
end

begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
end
5 changes: 5 additions & 0 deletions coverage/.last_run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"result": {
"covered_percent": 100.0
}
}
Loading