File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 137137 }
138138 }
139139 }
140+
141+ if !$foreman_proxy::manage_puppet_group and $foreman_proxy::ssl {
142+ file { $foreman_proxy::ssl_key :
143+ group => $foreman_proxy::user ,
144+ mode => ' 0640' ,
145+ before => Service[' foreman-proxy' ],
146+ }
147+ }
140148}
Original file line number Diff line number Diff line change 1717 $etc = ' /etc'
1818 $shell = ' /bin/false'
1919 $user = pick($foreman_proxy::globals::user , ' foreman-proxy' )
20+ $group = pick($foreman_proxy::globals::group , ' foreman-proxy' )
2021
2122 $dhcp_config = ' /etc/dhcp/dhcpd.conf'
2223 $dhcp_leases = ' /var/lib/dhcpd/dhcpd.leases'
Original file line number Diff line number Diff line change 385385 end
386386 end
387387
388+ context 'when not managing puppet group' do
389+ it "should manage ssl_key" do
390+ should contain_file ( "/etc/puppetlabs/puppet/ssl/private_keys/#{ facts [ 'networking' ] [ 'fqdn' ] } " )
391+ . with_mode ( '0640' )
392+ . with_group ( 'foreman-proxy' )
393+ . with_before ( 'Service["foreman-proxy"]' )
394+ end
395+ end
396+
388397 context 'with custom foreman_ssl params' do
389398 let :params do
390399 super ( ) . merge (
You can’t perform that action at this time.
0 commit comments