Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.

Solaris support #13

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 0 additions & 7 deletions .gemfile

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/.gradle
/metadata.json
/.rvmrc
build
pkg/
Expand All @@ -10,3 +9,4 @@ spec/fixtures
vendor
.bundle
.gemfile.lock
Gemfile.lock
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: ruby
bundler_args: --without development
rvm:
- 1.8.7
- 1.9.3
Expand Down Expand Up @@ -29,7 +30,6 @@ matrix:
- rvm: 2.1.4
env: PUPPET_VERSION="~> 3.3.0"
sudo: false
gemfile: .gemfile
notifications:
email:
- [email protected]
19 changes: 19 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
source 'https://rubygems.org'

puppetversion = ENV['PUPPET_VERSION']

is_ruby18 = RUBY_VERSION.start_with? '1.8'

if is_ruby18
gem 'rspec', "~> 3.1.0", :require => false
gem 'rake', '~> 10.5.0', :require => false
end
gem 'puppet', puppetversion, :require => false
gem 'puppet-lint'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'rspec-puppet'
gem 'metadata-json-lint'

group :development do
gem 'puppet-blacksmith'
end
4 changes: 2 additions & 2 deletions manifests/clone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
'present' : {
exec { "git-clone-${name}":
command => "git clone --recursive ${source_url} -b ${branch} ${extra_options} ${destination_dir}",
path => '/usr/bin',
path => '/usr/bin:/opt/csw/bin',
creates => $creates,
user => $owner,
}
Expand All @@ -64,4 +64,4 @@
}
}

}
}
7 changes: 6 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
### Application related parameters

$package = $::operatingsystem ? {
'Solaris' => $::operatingsystemmajrelease ? {
'10' => 'CSWgit',
'11' => 'developer/versioning/git',
'5' => 'developer/versioning/git',
},
default => 'git',
}

Expand Down Expand Up @@ -48,6 +53,6 @@
$version = 'present'
$absent = false
$audit_only = false
$noops = undef
$noops = false

}
8 changes: 8 additions & 0 deletions manifests/reposync.pp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@

$manage_execute_on_change = any2bool($execute_on_change)

if ! defined(File[$basedir]) {
file { $basedir:
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
}
if ! defined(File['git_reposync']) {
file { 'git_reposync':
ensure => present,
Expand Down
81 changes: 81 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"name": "example42-git",
"version": "2.1.0",
"summary": "Puppet module for git",
"license": "Apache-2.0",
"author": "Alessandro Franceschi, Martin Alfke",
"checksums": {
},
"source": "https://github.com/example42/puppet-git",
"project_page": "https://github.com/example42/puppet-git",
"issues_url": "https://github.com/example42/puppet-git/issues",
"operatingsystem_support": [
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7"
]
},
{
"operatingsystem": "Centos",
"operatingsystemrelease": [
"7"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
"7"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"14.04"
]
},
{
"operatingsystem": "Solaris",
"operatingsystemrelease": [
"10",
"11"
]
}
],
"requirements": [
{
"name": "pe",
"version_requirement": ">= 3.0.0 < 5.0.0"
},
{
"name": "puppet",
"version_requirement": ">= 3.0.0 < 5.0.0"
}
],
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 3.2.0 < 5.0.0"
},
{
"name": "example42/puppi",
"version_requirement": ">= 2.0.0"
},
{
"name": "example42/monitor",
"version_requirement": ">= 2.0.0"
},
{
"name": "example42/iptables",
"version_requirement": ">= 2.0.0"
},
{
"name": "example42/firewall",
"version_requirement": ">= 2.0.0"
},
{
"name": "puppetlabs/concat",
"version_requirement": ">= 1.0.0"
}
]
}
2 changes: 1 addition & 1 deletion templates/reposync/git_reposync-command.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/csw/bin

<% if @manage_execute_on_change == true %>
if [ ! -d <%= @destination_dir %> ] ; then
Expand Down
2 changes: 1 addition & 1 deletion templates/reposync/git_reposync-cron.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/csw/bin

<%= @cron %> <%= @user %> <%= @basedir %>/git_reposync_<%= @name %>