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

Move to puppetserver_foreman #749

Merged
merged 1 commit into from
Apr 6, 2021
Merged
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
18 changes: 7 additions & 11 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ fixtures:
cron_core:
repo: 'https://github.com/puppetlabs/puppetlabs-cron_core'
puppet_version: '>= 6.0.0'
extlib: 'https://github.com/voxpupuli/puppet-extlib.git'
foreman: 'https://github.com/theforeman/puppet-foreman.git'
git: 'https://github.com/theforeman/puppet-git.git'
inifile: 'https://github.com/puppetlabs/puppetlabs-inifile.git'
puppetdb: 'https://github.com/puppetlabs/puppetlabs-puppetdb.git'
redis: 'https://github.com/voxpupuli/puppet-redis.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
yumrepo_core:
repo: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core'
puppet_version: '>= 6.0.0'
extlib: 'https://github.com/voxpupuli/puppet-extlib.git'
git: 'https://github.com/theforeman/puppet-git.git'
inifile: 'https://github.com/puppetlabs/puppetlabs-inifile.git'
puppetdb: 'https://github.com/puppetlabs/puppetlabs-puppetdb.git'
puppetserver_foreman: 'https://github.com/theforeman/puppet-puppetserver_foreman.git'
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
systemd: 'https://github.com/camptocamp/puppet-systemd.git'
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ Requires [theforeman/git](https://forge.puppetlabs.com/theforeman/git).

## Foreman integration

With the 3.0.0 release the Foreman integration became optional. It will still
by default install the Foreman integration when `server` is true,
so if you wish to run a Puppet master without Foreman, it can be disabled by
setting `server_foreman` to false.
The Foreman integration is optional, but on by default when `server` is true.
It can be disabled by setting `server_foreman` to false.

Requires [theforeman/foreman](https://forge.puppetlabs.com/theforeman/foreman).
Requires [theforeman/puppetserver_foreman](https://forge.puppetlabs.com/theforeman/puppetserver_foreman).

Since version 15.0.0 the integration bits depend on the standalone module where
previously it depended on
[theforeman/foreman](https://forge.puppetlabs.com/theforeman/foreman)

## PuppetDB integration

Expand Down
22 changes: 11 additions & 11 deletions manifests/server/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -287,17 +287,17 @@
if $puppet::server::foreman {
# Include foreman components for the puppetmaster
# ENC script, reporting script etc.
class { 'foreman::puppetmaster':
foreman_url => $puppet::server::foreman_url,
receive_facts => $puppet::server::server_foreman_facts,
puppet_home => $puppet::server::puppetserver_vardir,
puppet_basedir => $puppet::server::puppet_basedir,
puppet_etcdir => $puppet::dir,
timeout => $puppet::server::request_timeout,
ssl_ca => pick($puppet::server::foreman_ssl_ca, $puppet::server::ssl_ca_cert),
ssl_cert => pick($puppet::server::foreman_ssl_cert, $puppet::server::ssl_cert),
ssl_key => pick($puppet::server::foreman_ssl_key, $puppet::server::ssl_cert_key),
class { 'puppetserver_foreman':
foreman_url => $puppet::server::foreman_url,
enc_upload_facts => $puppet::server::server_foreman_facts,
enc_timeout => $puppet::server::request_timeout,
puppet_home => $puppet::server::puppetserver_vardir,
puppet_basedir => $puppet::server::puppet_basedir,
puppet_etcdir => $puppet::dir,
ssl_ca => pick($puppet::server::foreman_ssl_ca, $puppet::server::ssl_ca_cert),
ssl_cert => pick($puppet::server::foreman_ssl_cert, $puppet::server::ssl_cert),
ssl_key => pick($puppet::server::foreman_ssl_key, $puppet::server::ssl_cert_key),
}
contain foreman::puppetmaster
contain puppetserver_foreman
}
}
10 changes: 5 additions & 5 deletions spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@
it { should_not contain_file("#{confdir}/autosign.conf").with_content(/foo.bar/) }

it 'should set up the ENC' do
should contain_class('foreman::puppetmaster')
should contain_class('puppetserver_foreman')
.with_foreman_url('https://foo.example.com')
.with_receive_facts(true)
.with_enc_upload_facts(true)
.with_enc_timeout(60)
.with_puppet_home(puppetserver_vardir)
.with_puppet_etcdir(etcdir)
.with_timeout(60)
.with_puppet_basedir(rubydir)
end

Expand Down Expand Up @@ -317,7 +317,7 @@
)
end

it { should_not contain_class('foreman::puppetmaster') }
it { should_not contain_class('puppetserver_foreman') }
it { should_not contain_puppet__config__master('node_terminus') }
it { should_not contain_puppet__config__master('external_nodes') }
end
Expand Down Expand Up @@ -429,7 +429,7 @@
end

it 'should pass SSL parameters to the ENC' do
should contain_class('foreman::puppetmaster')
should contain_class('puppetserver_foreman')
.with_ssl_ca('/etc/example/ca.pem')
.with_ssl_cert('/etc/example/cert.pem')
.with_ssl_key('/etc/example/key.pem')
Expand Down