File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed
Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 4949 }
5050
5151 if $ensure == ' present' and $verify_config {
52- exec { "service notify for ${name}" :
52+ exec { "syntax verification for ${name}" :
5353 command => $verify_command ,
5454 subscribe => File [" apache_${name} " ],
5555 refreshonly => true ,
5656 notify => Class[' Apache::Service' ],
5757 before => Exec[" remove ${name} if invalid" ],
58+ require => Anchor[' ::apache::modules_set_up' ]
5859 }
5960
6061 exec { "remove ${name} if invalid" :
Original file line number Diff line number Diff line change 381381 manage_docroot => $default_ssl_vhost ,
382382 }
383383 }
384+
385+ # This anchor can be used as a reference point for things that need to happen *after*
386+ # all modules have been put in place.
387+ anchor { '::apache::modules_set_up' : }
384388}
Original file line number Diff line number Diff line change 162162 }
163163 }
164164 }
165+
166+ Apache::Mod[$name ] -> Anchor[' ::apache::modules_set_up' ]
165167}
Original file line number Diff line number Diff line change 2626 'content' => '# Test' ,
2727 }
2828 end
29- it { is_expected . to contain_exec ( "service notify for rspec" ) . with ( {
29+ it { is_expected . to contain_exec ( "syntax verification for rspec" ) . with ( {
3030 'refreshonly' => 'true' ,
3131 'subscribe' => 'File[apache_rspec]' ,
3232 'command' => '/usr/sbin/apachectl -t' ,
5656 'verify_command' => '/bin/true' ,
5757 }
5858 end
59- it { is_expected . to contain_exec ( "service notify for rspec" ) . with ( {
59+ it { is_expected . to contain_exec ( "syntax verification for rspec" ) . with ( {
6060 'command' => '/bin/true' ,
6161 } )
6262 }
8080 'verify_config' => false ,
8181 }
8282 end
83- it { is_expected . to_not contain_exec ( 'service notify for rspec' ) }
83+ it { is_expected . to_not contain_exec ( 'syntax verification for rspec' ) }
8484 it { is_expected . to_not contain_exec ( 'remove rspec if invalid' ) }
8585 it { is_expected . to contain_file ( 'apache_rspec' ) . with ( {
8686 'notify' => 'Class[Apache::Service]'
9393 'ensure' => 'absent'
9494 }
9595 end
96- it { is_expected . to_not contain_exec ( 'service notify for rspec' ) }
96+ it { is_expected . to_not contain_exec ( 'syntax verification for rspec' ) }
9797 it { is_expected . to_not contain_exec ( 'remove rspec if invalid' ) }
9898 it { is_expected . to contain_file ( 'apache_rspec' ) . with ( {
9999 'ensure' => 'absent' ,
You can’t perform that action at this time.
0 commit comments