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

stop forcing root ownership of vardir #923

Open
wants to merge 8 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
8 changes: 1 addition & 7 deletions manifests/server/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -229,20 +229,14 @@
}

if $puppet::server::git_repo {
file { $puppet::vardir:
ensure => directory,
owner => 'root',
group => 'root',
}

vcsrepo { 'puppet_repo':
ensure => 'bare',
provider => 'git',
path => $puppet::server::git_repo_path,
user => $puppet::server::git_repo_user,
group => $puppet::server::git_repo_group,
umask => $puppet::server::git_repo_umask,
require => File[$puppet::vardir, $primary_envs_dir],
require => File[$primary_envs_dir],
}

$git_branch_map = $puppet::server::git_branch_map
Expand Down
6 changes: 0 additions & 6 deletions spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,6 @@
.that_requires('Package[git]')
end

it do
should contain_file(vardir)
.with_ensure('directory')
.with_owner('root')
Copy link
Member

Choose a reason for hiding this comment

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

If you add this back, does it still pass?

Copy link
Author

Choose a reason for hiding this comment

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

good point, looks like it does!

end

it do
should contain_vcsrepo('puppet_repo')
.with_ensure('bare')
Expand Down Expand Up @@ -484,7 +478,7 @@
)
end

it 'should not sync the crl' do

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on almalinux-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on almalinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on centos-7-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on centos-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on centos-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on debian-11-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on debian-12-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on fedora-36-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on freebsd-11-amd64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 8 (Ruby 3.2)

puppet on freebsd-12-amd64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on freebsd-12-amd64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on almalinux-8-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on ubuntu-22.04-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on centos-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on redhat-7-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on debian-11-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on rocky-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on fedora-36-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on ubuntu-20.04-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]

Check warning on line 481 in spec/classes/puppet_server_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / 7 (Ruby 2.7)

puppet on oraclelinux-9-x86_64 with server_ca_crl_sync => true with server_ca => false and running "puppet apply" should not sync the crl Failure/Error: should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem') expected that the catalogue would not contain File[/etc/custom/puppetlabs/puppet/ssl/crl.pem]
# https://github.com/puppetlabs/rspec-puppet/issues/37
pending("rspec-puppet always sets $server_facts['servername']")
should_not contain_file('/etc/custom/puppetlabs/puppet/ssl/crl.pem')
Expand Down
Loading