Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (22 commits)
  Release 1.9.3
  Update with modulesync
  Release 1.9.2
  Remove now unsupported "pe" requirement
  Release version 1.9.1
  Update with modulesync
  Release 1.9.0
  Remove Puppet 3 compatibility in metadata.json
  Force managing local users.
  Remove Puppet 3 tests fully
  Modulesync: remove Puppet 3 tests
  Update with modulesync
  Update with modulesync
  modulesync
  Fix ParseError test
  Release version 1.8.1
  Update with modulesync
  Speed up acceptance tests on centos-5
  delete .travis.yml.swp
  Update with modulesync
  ...
  • Loading branch information
nettucu committed Jul 18, 2017
2 parents b457121 + a069b66 commit 9ff879b
Show file tree
Hide file tree
Showing 24 changed files with 264 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--fail-on-warnings
--relative
--no-80chars
--no-140chars
--no-documentation
--no-class_inherits_from_params_class-check
3 changes: 0 additions & 3 deletions .sync.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
---
.travis.yml:
forge_password: "cigHpMryWewlnZKALuS6zQUDpqKSJs7eg0BYpH2mwHRHjJlIm299njXDKN/8eyfVadn/bXa4LSGoxtPQywuNp0nWfZUpY5j7ay+78drMAGoFxvKjthBt34ds6B2Pq9VvJvxA6xikQxk7sgJy0MNj1wv/kLZs7WvnAeokhIbwRGQ="
extras:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.5.0"
20 changes: 7 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,18 @@ addons:
apt:
packages:
- libaugeas-dev
sources:
- augeas
cache: bundler
bundler_args: --without system_tests
script: ["bundle exec rake validate", "bundle exec rake lint", "bundle exec rake spec SPEC_OPTS='--format documentation'", "bundle exec rake metadata"]
script: ["bundle exec rake validate", "bundle exec rake lint", "bundle exec rake spec SPEC_OPTS='--format documentation'"]
matrix:
fast_finish: true
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.6
- rvm: 2.1.10
env: PUPPET_GEM_VERSION="~> 4.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.5.0"
- rvm: 2.3.4
env: PUPPET_GEM_VERSION="~> 4"
notifications:
email: false
deploy:
Expand All @@ -35,4 +29,4 @@ deploy:
# all_branches is required to use tags
all_branches: true
# Only publish if our main Ruby target builds
rvm: 1.9.3
rvm: 2.1.10
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
## 2017-05-22 - Release 1.9.3

Really fix automated release system...

## 2017-05-22 - Release 1.9.2

Fix automated release system

## 2017-01-10 - Release 1.9.0

Remove Puppet 3 support
Fix ParseError test

## 2016-06-20 - Release 1.8.1

Update test files

## 2016-02-18 - Release 1.8.0

Parameterize managehome (issue #21)

## 2015-11-12 - Release 1.7.0

Allow to set options to ssh_authorized_key
Expand Down
17 changes: 8 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec', '< 3.2', :require => false if RUBY_VERSION =~ /^1.8/
gem 'rspec', :require => false
gem 'rspec-puppet', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet-lint', :require => false
gem 'puppet-lint-unquoted_string-check', :require => false
gem 'puppet-lint-empty_string-check', :require => false
gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false
gem 'puppet-lint-variable_contains_upcase', :require => false
gem 'puppet-lint-absolute_classname-check', :require => false
gem 'puppet-lint-undef_in_function-check', :require => false
gem 'puppet-lint-leading_zero-check', :require => false
gem 'puppet-lint-trailing_comma-check', :require => false
gem 'puppet-lint-file_ensure-check', :require => false
gem 'puppet-lint-version_comparison-check', :require => false
gem 'puppet-lint-fileserver-check', :require => false
gem 'puppet-lint-file_source_rights-check', :require => false
gem 'puppet-lint-alias-check', :require => false
gem 'rspec-puppet-facts', :require => false
gem 'ruby-augeas', :require => false
gem 'github_changelog_generator', :require => false if RUBY_VERSION !~ /^1.8/
gem 'puppet-blacksmith', :require => false if RUBY_VERSION !~ /^1.8/
gem 'puppet-blacksmith', :require => false if RUBY_VERSION !~ /^1\./
gem 'json_pure', '< 2.0.2', :require => false
end

group :system_tests do
gem 'beaker', :require => false
gem 'beaker-rspec', :require => false
gem 'beaker_spec_helper', :require => false
gem 'serverspec', :require => false
gem 'beaker', :require => false
gem 'beaker-rspec', '> 5', :require => false
gem 'beaker_spec_helper', :require => false
gem 'serverspec', :require => false
gem 'specinfra', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ Hash of user groups (see _Usage_ above).

Hash of accounts to create (see _Usage_ above).

###`forcelocal`

Set the resource "user" parameter so that the users are not created/supressed in external user directories (i.e. LDAP).

###`start_uid`

Sets the lowest uid for non system users. This is a system setting and also affects users created outside of this module.
Expand Down
10 changes: 2 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,14 @@ require 'puppet-lint/tasks/puppet-lint'
Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "vendor/**/*.pp"]
config.disable_checks = ['80chars']
config.disable_checks = ['140chars']
config.fail_on_warnings = true
end

PuppetSyntax.exclude_paths = ["spec/fixtures/**/*.pp", "vendor/**/*"]

# Publishing tasks
unless RUBY_VERSION =~ /^1\.8/
unless RUBY_VERSION =~ /^1\./
require 'puppet_blacksmith'
require 'puppet_blacksmith/rake_tasks'
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
m = Blacksmith::Modulefile.new
config.future_release = m.version
config.release_url = "https://forge.puppetlabs.com/#{m.author}/#{m.name}/%s"
end
end
3 changes: 3 additions & 0 deletions manifests/account.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$shell = $::accounts::shell,
$home = undef,
$managehome = $::accounts::managehome,
$forcelocal = $::accounts::forcelocal,
$password = undef,
$uid = undef,
$gid = undef,
Expand All @@ -33,6 +34,7 @@
authorized_keys_target => $authorized_keys_target,
purge_ssh_keys => $purge_ssh_keys,
ssh_authorized_key_title => $ssh_authorized_key_title,
forcelocal => $forcelocal,
shell => $shell,
home => $home,
password => $password,
Expand Down Expand Up @@ -64,6 +66,7 @@
password => $password,
managehome => $managehome,
membership => $groups_membership,
forcelocal => $forcelocal,
shell => $shell,
uid => $uid,
gid => $gid,
Expand Down
4 changes: 3 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
$ssh_authorized_key_title = '%{ssh_key}-on-%{account}',
$shell = undef,
$managehome = true,
$forcelocal = true,
) {
include ::accounts::config

Expand All @@ -22,6 +23,7 @@
#Remove users marked as absent
$absent_users = keys(absents($users))
user { $absent_users:
ensure => absent,
ensure => absent,
forcelocal => $forcelocal,
}
}
19 changes: 2 additions & 17 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "camptocamp-accounts",
"version": "1.7.0",
"version": "1.9.3",
"author": "camptocamp",
"summary": "Puppet module for Managing SSH keys, users and groups",
"license": "Apache-2.0",
Expand All @@ -14,13 +14,9 @@
}
],
"requirements": [
{
"name": "pe",
"version_requirement": "3.x"
},
{
"name": "puppet",
"version_requirement": "3.x"
"version_requirement": "4.x"
}
],
"operatingsystem_support": [
Expand Down Expand Up @@ -48,16 +44,5 @@
"7"
]
}
],
"puppet_version": [
"2.7",
"3.0",
"3.1",
"3.2",
"3.3",
"3.4",
"3.5",
"3.6",
"3.7"
]
}
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/centos-5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOSTS:
centos-5-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-5-x86_64
hypervisor : docker
image: tianon/centos:5.10
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'yum install -y crontabs tar wget which'
- 'sed -i -e "/mingetty/d" /etc/inittab'
CONFIG:
type: aio
log_level: debug
17 changes: 17 additions & 0 deletions spec/acceptance/nodesets/centos-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
HOSTS:
centos-6-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-6-x86_64
hypervisor : docker
image: centos:6
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'rm -rf /var/run/network/*'
- 'yum install -y crontabs tar wget'
- 'rm /etc/init/tty.conf'
CONFIG:
type: aio
log_level: debug
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/centos-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
HOSTS:
centos-7-x64:
default_apply_opts:
order: random
strict_variables:
platform: el-7-x86_64
hypervisor : docker
image: centos:7
docker_preserve_image: true
docker_cmd: '["/usr/sbin/init"]'
docker_image_commands:
- 'yum install -y crontabs tar wget iproute'
CONFIG:
type: aio
log_level: debug
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/debian-6.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
HOSTS:
debian-6-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-6-amd64
hypervisor : docker
image: debian/eol:squeeze
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools wget'
CONFIG:
type: aio
log_level: debug
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/debian-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
HOSTS:
debian-7-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-7-amd64
hypervisor : docker
image: debian:7
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools wget'
CONFIG:
type: aio
log_level: debug
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/debian-8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOSTS:
debian-8-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-8-amd64
hypervisor : docker
image: debian:8
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools wget'
- 'rm -f /usr/sbin/policy-rc.d'
CONFIG:
type: aio
log_level: debug
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/debian-9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
HOSTS:
debian-9-x64:
default_apply_opts:
order: random
strict_variables:
platform: debian-9-amd64
hypervisor : docker
image: debian:9
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y cron locales-all net-tools systemd-sysv wget'
CONFIG:
type: aio
log_level: debug
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/ubuntu-12.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOSTS:
ubuntu-1204-x64:
default_apply_opts:
order: random
strict_variables:
platform: ubuntu-12.04-amd64
hypervisor : docker
image: ubuntu:12.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -y net-tools wget'
- 'locale-gen en_US.UTF-8'
CONFIG:
type: aio
log_level: debug
18 changes: 18 additions & 0 deletions spec/acceptance/nodesets/ubuntu-14.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
HOSTS:
ubuntu-1404-x64:
default_apply_opts:
order: random
strict_variables:
platform: ubuntu-14.04-amd64
hypervisor : docker
image: ubuntu:14.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'rm /usr/sbin/policy-rc.d'
- 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl'
- 'apt-get install -y net-tools wget'
- 'locale-gen en_US.UTF-8'
CONFIG:
type: aio
log_level: debug
Loading

0 comments on commit 9ff879b

Please sign in to comment.