There are 3 methods to test the incomplete certificate chain: 1) https://www.ssllabs.com/ssltest/analyze.html?d=example.com The error is: Chain issues Incomplete 2) curl -v -o /dev/null https://example.com The error is: * NSS error -8179 (SEC_ERROR_UNKNOWN_ISSUER) * Peer's Certificate issuer is not recognized. 3) openssl s_client -showcerts -verify 10 -connect example.com:443 The error is: Verify return code: 21 (unable … Continue reading Incomplete certificate chain
Puppet – Configuring Storeconfigs for MySQL
Exported resource allow node to share information with each other. This is useful when one node has information that another node needs in order to manage a resource. The common cases are monitoring and backups. To use exported resource in Puppet, the storeconfigs has to be enabled. This will allow puppet to save data (resources, … Continue reading Puppet – Configuring Storeconfigs for MySQL
Puppet kick
When I try to run puppet in foreman, it failed (the error is as above). The reason is that I have not configured to allow the 'puppet kick' to run. Here is how to make it work: 1) Add the following in the [main] section of /etc/puppet/puppet.conf listen = trun 2) Add the following in … Continue reading Puppet kick
Puppet motd template
1) Create the manifest of sys_motd module/etc/puppet/environments/development/modules/sys_motd/manifests/init.ppclass sys_motd { file { '/etc/motd': ensure => file, content => template('sys_motd/motd.erb'), }}2) Create a ERB file as the motd template/etc/puppet/environments/development/modules/sys_motd/templates/motd.erb#################################HOST: <%= fqdn %> OS: <%= operatingsystem %> VERSION: <%= operatingsystemrelease %> ENVIRONMENT: <%= environment %>#################################
Puppet custom facter
In my lab, I added a custom facter 'environment', which tells me the box is in either development or production.Here are the steps1) Create a new module and associated file: /etc/puppet/modules/mylab/lib/facter/environment.rb2) Add the ruby code:# Add puppet facter environmentFacter.add("environment") do setcode do result = case Facter.hostname when /^dev/: "development" else "production" end result endendReference:https://docs.puppetlabs.com/facter/2.2/custom_facts.html