Skip to content

Commit

Permalink
Merge pull request #531 from chadh/remove_puppetlabs_git
Browse files Browse the repository at this point in the history
[Issue #530] Removes dependence on puppetlabs-git
  • Loading branch information
bastelfreak authored Jun 27, 2020
2 parents 5be35aa + fef593f commit ea09304
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 19 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class { 'r10k':
### What r10k affects

* Installation of the r10k `gem`
* Installation of git
* Installation of ruby when not using an existing ruby stack i.e. when using `puppet_gem`
* Management of the `r10k.yaml` in /etc
* Installation and configuration of a sinatra app when using the [webhook](#webhook-support).
Expand Down Expand Up @@ -86,14 +85,15 @@ You can override this by passing the `version` parameter.

### Setup Requirements

r10k connects via ssh and does so silently in the background, this typically requires ssh keys to be deployed in advance of configuring
r10k. This includes the known host ( public ) key of the respective git server, and the user running r10k's private key used to authenticate
git/ssh during background runs.
r10k connects via ssh and does so silently in the background, this typically requires ssh keys to be deployed in advance of configuring r10k. This includes the known host ( public ) key of the respective git server, and the user running r10k's private key used to authenticate git/ssh during background runs. If you are going to use git repos to retrieve modules, you also need git installed.

Here is an example of deploying the ssh keys needed for r10k to connect to a repo called puppet/control on a gitlab server.
This is helpful when you need to automatically deploy new masters
Here is an example of deploying the git package and ssh keys needed for r10k to connect to a repo called puppet/control on a gitlab server. This is helpful when you need to automatically deploy new masters

```puppet
package { 'git':
ensure => installed,
}
#https://docs.puppetlabs.com/references/latest/type.html#sshkey
sshkey { 'your.internal.gitlab.server.com':
ensure => present,
Expand Down
3 changes: 0 additions & 3 deletions manifests/install/bundle.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
$revision = 'master',
$source = 'https://github.com/adrienthebo/r10k.git',
){

require git

# The bundle install has prefix support as of writing this, I want bleeding edge.
package { "${module_name}-bundle":
ensure => installed,
Expand Down
2 changes: 0 additions & 2 deletions manifests/install/gem.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
$manage_ruby_dependency,
$version,
) {
require git

case $manage_ruby_dependency {
'include': {
include ruby
Expand Down
4 changes: 0 additions & 4 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
{
"name": "puppetlabs/vcsrepo",
"version_requirement": ">= 1.3.1 < 4.0.0"
},
{
"name": "puppetlabs/git",
"version_requirement": ">= 0.5.0 < 1.0.0"
}
],
"requirements": [
Expand Down
4 changes: 0 additions & 4 deletions spec/classes/install_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
}
end

it { is_expected.to contain_class('git') }

it { is_expected.to contain_class('r10k::install::gem').with(version: version) }
it do
is_expected.to contain_package('r10k').with(
Expand Down Expand Up @@ -89,7 +87,6 @@
}
end

it { is_expected.not_to contain_class('git') }
it { is_expected.to contain_class('r10k::install::puppet_gem') }
it do
is_expected.to contain_package('r10k').with(
Expand Down Expand Up @@ -169,7 +166,6 @@
}
end

it { is_expected.to contain_class('git') }
it { is_expected.to contain_class('r10k::install::bundle') }
it { is_expected.not_to contain_package('r10k') }
end
Expand Down

0 comments on commit ea09304

Please sign in to comment.