onehealth-cookbooks/apache2 — pull request #158 by martinb3 (2014-07-08 15:09:05+00:00)
Title: a2ensite command should match File.exist? guard

Please see https://github.com/onehealth-cookbooks/apache2/issues/149 for an explanation of why this change is required. Because `#{params[:name]}.conf` is used in the `only_if` that guards the execution of a2ensite, and because this cookbook creates files with naming convention `#{params[:name]}.conf`, we should be calling a2ensite with that same argument (`"a2ensite #{params[:name]}.conf"` instead of `"a2ensite #{params[:name]}"`).

The referenced issue also adjusts the default template from `#{node['apache']['dir']}/sites-available/default` to `#{node['apache']['dir']}/sites-available/default.conf` (it's basically assuming a `.conf` everywhere. we should probably remove all the non-.conf references if we're going to do this, as I think the previous issue and PR missed some in addition to the a2ensite resource).

After this change,