Hi Al,
In writing up an reply showing my test env, I've discovered and solved the problem -
In ssl.pp:
require => Package['apache'],
Should
be 'mod_ssl', Apache is already installed, the module creates an empty
file from the empty template/source before mod_ssl is installed. Then
mod_ssl package is installed and a new file is created as
ssl.conf.rpmnew.
Anyway, here's the test env details with what was happening:
node 'client1' {
class { 'puppet': }
class { 'apache': }
class { 'apache::ssl':
ssl_template => 'udfiles/apache/ssl.conf-secure.erb',
}
}
So
the sole purpose of that ssl.conf template is to manage SSLProtocol and
SSLCiphers so that by default we're on a more secure standard. First
puppet run produces this:
Notice: /Stage[main]/Apache/Package[apache]/ensure: created
Notice: /Stage[main]/Apache::Ssl/File[ssl.conf]/ensure: created
Info: /Stage[main]/Apache::Ssl/File[ssl.conf]: Scheduling refresh of Service[apache]
Notice: /Stage[main]/Apache::Ssl/Package[mod_ssl]/ensure: created
Info: /Stage[main]/Apache::Ssl/Package[mod_ssl]: Scheduling refresh of Service[apache]
Notice: /Stage[main]/Apache::Ssl/File[/var/cache/mod_ssl/scache]/ensure: created
Info: /Stage[main]/Apache::Ssl/File[/var/cache/mod_ssl/scache]: Scheduling refresh of Service[apache]
Notice: /Stage[main]/Apache/Service[apache]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Apache/Service[apache]: Unscheduling refresh on Service[apache]
Using NMAP I can validate my SSL security -
[root@puppet vagrant]# nmap --script ssl-enum-ciphers client1
...
443/tcp open https
| ssl-enum-ciphers:
| TLSv1.2
| Ciphers (12)
...
All
is good. Now, to undo this config, I yum remove httpd and mod_ssl, and
comment out the template_ssl param in the node definition, then run
puppet again. Note the removal of mod_ssl creates a ssl.conf.rpmsave
file.
[root@client1 ~]# puppet agent --test
...
Info: Applying configuration version '1424368562'
Notice: /Stage[main]/Apache/Package[apache]/ensure: created
Notice: /Stage[main]/Apache::Ssl/File[ssl.conf]/ensure: created
Info: /Stage[main]/Apache::Ssl/File[ssl.conf]: Scheduling refresh of Service[apache]
Notice: /Stage[main]/Apache::Ssl/Package[mod_ssl]/ensure: created
Info: /Stage[main]/Apache::Ssl/Package[mod_ssl]: Scheduling refresh of Service[apache]
Notice: /Stage[main]/Apache/Service[apache]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Apache/Service[apache]: Unscheduling refresh on Service[apache]
Notice: Finished catalog run in 15.29 seconds
...
[root@client1 ~]# ls -l /etc/httpd/conf.d/
total 32
-rw-r--r-- 1 root root 392 Oct 16 16:49 README
-rw-r--r-- 1 root root 0 Feb 19 18:56 ssl.conf
-rw-r--r-- 1 root root 9473 Aug 15 2014 ssl.conf.rpmnew
-rw-r--r-- 1 root root 9548 Feb 19 18:46 ssl.conf.rpmsave
-rw-r--r-- 1 root root 299 Aug 15 2014 welcome.conf
So,
now that this is fixed, and given that you're moving away from these
modules, do you want me to send over a PR for this new feature?