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

Clone git repository as $user #352

Merged
merged 4 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 1 addition & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
vcsrepo { "${basedir}/puppetboard":
ensure => present,
provider => git,
owner => $user,
user => $user,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will that break existing installations? was that maybe setup like that on purpose, so the user that runs it has no permissions / less permissions?

Copy link
Member Author

@smortex smortex Mar 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only case I can see is if the user cannot traverse one of the parent directories.

Because of #349 (review) I would also want to change this user to root:root by default, but this will be a breaking change.

source => $git_source,
revision => $revision,
require => [
Expand All @@ -150,12 +150,6 @@
],
}

file { "${basedir}/puppetboard":
owner => $user,
recurse => true,
require => Vcsrepo["${basedir}/puppetboard"],
}

$pyvenv_proxy_env = $python_proxy ? {
undef => [],
default => [
Expand Down
1 change: 0 additions & 1 deletion spec/classes/puppetboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
it { is_expected.to contain_package('py38-puppetboard') }
else
it { is_expected.to contain_file('/srv/puppetboard/puppetboard/settings.py') }
it { is_expected.to contain_file('/srv/puppetboard/puppetboard') }
it { is_expected.to contain_file('/srv/puppetboard') }
it { is_expected.to contain_python__pyvenv('/srv/puppetboard/virtenv-puppetboard') }
it { is_expected.to contain_vcsrepo('/srv/puppetboard/puppetboard') }
Expand Down