From 0775717ed0600c3a04e816217f0e6e113cc78d59 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Thu, 5 Oct 2017 12:41:21 +0200 Subject: [PATCH] Use implicit dependency chaining on puppet https://github.com/theforeman/puppet-puppet/commit/2fb8ad506566092d146492f49e7892ca0fb93b64 ensures the puppet user is always managed. This means the file resource will autorequire the user causing the chaining to work. --- .fixtures.yml | 2 -- manifests/puppet.pp | 7 +++---- spec/classes/certs_foreman_proxy_content_spec.rb | 11 ----------- spec/classes/certs_puppet_spec.rb | 10 ---------- 4 files changed, 3 insertions(+), 27 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 1ff32193..bf2c4f26 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -5,7 +5,5 @@ fixtures: common: "https://github.com/katello/puppet-common.git" trusted_ca: "https://github.com/jlambert121/jlambert121-trusted_ca" concat: "https://github.com/puppetlabs/puppetlabs-concat" - apache: "https://github.com/puppetlabs/puppetlabs-apache" - puppet: "https://github.com/theforeman/puppet-puppet" symlinks: certs: "#{source_dir}" diff --git a/manifests/puppet.pp b/manifests/puppet.pp index 071c70ce..418e3a61 100644 --- a/manifests/puppet.pp +++ b/manifests/puppet.pp @@ -43,10 +43,9 @@ if $deploy { file { "${pki_dir}/puppet": - ensure => directory, - owner => 'puppet', - mode => '0700', - require => Class['puppet::server::install'], + ensure => directory, + owner => 'puppet', + mode => '0700', } -> certs::keypair { 'puppet': key_pair => $puppet_client_cert_name, diff --git a/spec/classes/certs_foreman_proxy_content_spec.rb b/spec/classes/certs_foreman_proxy_content_spec.rb index 3db69a76..cdf182d1 100644 --- a/spec/classes/certs_foreman_proxy_content_spec.rb +++ b/spec/classes/certs_foreman_proxy_content_spec.rb @@ -5,17 +5,6 @@ on_supported_os['redhat-7-x86_64'] end - let :pre_condition do - " -package{ 'qpid-cpp-server': } -class { 'puppet': - server_foreman => false, - agent => false, - server => true, -} - " - end - let :params do { :certs_tar => '/tmp/tar' diff --git a/spec/classes/certs_puppet_spec.rb b/spec/classes/certs_puppet_spec.rb index b0f897f4..88ff5dc3 100644 --- a/spec/classes/certs_puppet_spec.rb +++ b/spec/classes/certs_puppet_spec.rb @@ -5,16 +5,6 @@ on_supported_os['redhat-7-x86_64'] end - let :pre_condition do - " -class { 'puppet': - server_foreman => false, - agent => false, - server => true, -} - " - end - describe 'with default parameters' do it { should compile.with_all_deps } end