File tree Expand file tree Collapse file tree 2 files changed +21
-3
lines changed
manifests/plugin/remote_execution Expand file tree Collapse file tree 2 files changed +21
-3
lines changed Original file line number Diff line number Diff line change 9797 File <| title == $ssl_cert |> ~> File [" ${mosquitto_ssl_dir} /ssl_cert.pem" ]
9898 File <| title == $ssl_key |> ~> File [" ${mosquitto_ssl_dir} /ssl_key.pem" ]
9999 File <| title == $ssl_ca |> ~> File [" ${mosquitto_ssl_dir} /ssl_ca.pem" ]
100+
101+ if defined (' private_key' ) {
102+ Private_key <| title == $ssl_key |> ~> File [" ${mosquitto_ssl_dir} /ssl_key.pem" ]
103+ }
100104}
Original file line number Diff line number Diff line change 9999 end
100100
101101 it 'should notify mosquitto certs when source changes' do
102- should contain_file ( '/etc/foreman-proxy/ssl_cert.pem' ) . with_notify ( [ 'File[/etc/mosquitto/ssl/ssl_cert.pem]' ] )
103- should contain_file ( '/etc/foreman-proxy/ssl_key.pem' ) . with_notify ( [ 'File[/etc/mosquitto/ssl/ssl_key.pem]' ] )
104- should contain_file ( '/etc/foreman-proxy/ssl_ca.pem' ) . with_notify ( [ 'File[/etc/mosquitto/ssl/ssl_ca.pem]' ] )
102+ should contain_file ( '/etc/foreman-proxy/ssl_cert.pem' ) . that_notifies ( 'File[/etc/mosquitto/ssl/ssl_cert.pem]' )
103+ should contain_file ( '/etc/foreman-proxy/ssl_key.pem' ) . that_notifies ( 'File[/etc/mosquitto/ssl/ssl_key.pem]' )
104+ should contain_file ( '/etc/foreman-proxy/ssl_ca.pem' ) . that_notifies ( 'File[/etc/mosquitto/ssl/ssl_ca.pem]' )
105+ end
106+ end
107+
108+ describe 'with certs deployed by puppet as custom types' do
109+ let ( :pre_condition ) do
110+ <<-PUPPET
111+ define private_key () { file { $name: ensure => file } }
112+
113+ private_key { '/etc/foreman-proxy/ssl_key.pem': }
114+ PUPPET
115+ end
116+
117+ it 'should notify mosquitto certs when source changes' do
118+ should contain_private_key ( '/etc/foreman-proxy/ssl_key.pem' ) . that_notifies ( 'File[/etc/mosquitto/ssl/ssl_key.pem]' )
105119 end
106120 end
107121
You can’t perform that action at this time.
0 commit comments