File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed
manifests/plugin/remote_execution Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 9191 group => ' mosquitto' ,
9292 mode => ' 0440' ,
9393 }
94+
95+ # Ensure certs were deployed before we try to source them
96+ # This is a workaround for https://tickets.puppetlabs.com/browse/PUP-3399
97+ File <| title == $ssl_cert |> ~> File [" ${mosquitto_ssl_dir} /ssl_cert.pem" ]
98+ File <| title == $ssl_key |> ~> File [" ${mosquitto_ssl_dir} /ssl_key.pem" ]
99+ File <| title == $ssl_ca |> ~> File [" ${mosquitto_ssl_dir} /ssl_ca.pem" ]
94100}
Original file line number Diff line number Diff line change 8989 end
9090 end
9191
92+ describe 'with certs deployed by puppet' do
93+ let ( :pre_condition ) do
94+ <<-PUPPET
95+ file { '/etc/foreman-proxy/ssl_cert.pem': ensure => file }
96+ file { '/etc/foreman-proxy/ssl_key.pem': ensure => file }
97+ file { '/etc/foreman-proxy/ssl_ca.pem': ensure => file }
98+ PUPPET
99+ end
100+
101+ 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]' ] )
105+ end
106+ end
107+
92108 describe '' do
93109 let ( :params ) { super ( ) . merge ( :ensure => 'absent' ) }
94110
You can’t perform that action at this time.
0 commit comments