Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

::fqdn no longer valid for vhost name in hiera file for puppetlabs-apache module?

$
0
0
Until today, the hiera .yaml file for our CentOS 7.3-based apache server hosts were able to use "%{::fqdn}: to name a vhost (see below). However, after upgrading from puppet-agent-1.8.2-1.el7.x86_64 to puppet-agent-1.9.0-1.el7.x86_64 I found I had to hard-code the vhost name. All other uses of variables like ::fqdn and ::hostname continue to work. (I note that puppetserver has been 2.7.2 since 22 DEC, 2016.) After the error started I updated the puppetlabs-apache module from 1.8.1 to 1.11.0 just in case that was the problem. It did not resolve the error. (All references to 'redacted' below equate to the fully qualified hostname of the host in question.) Runs with the vhost defined with the variable result in: > Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Invalid tag '25-%{__fqdn}.conf' at /etc/puppetlabs/code/environments/development/modules/concat/manifests/init.pp:123 at /etc/puppetlabs/code/environments/development/modules/apache/manifests/vhost.pp:623 on node redacted The difference between the old and new .yaml file: diff -c redacted.yaml redacted.yaml.old *** redacted.yaml 2017-02-10 09:36:22.540150497 -0800 --- redacted.yaml.old 2017-02-10 09:55:48.127742173 -0800 *************** *** 12,24 **** # ## configure apache for vhost apache::vhosts: ! "redacted": docroot: "/var/www/%{::hostname}" port: "80" redirect_dest: https://%{::fqdn} redirect_status: 'permanent' vhost_name: "%{::fqdn}" ! "redacted": docroot: "/var/www/%{::hostname}" port: "443" vhost_name: "%{::fqdn}" --- 12,24 ---- # ## configure apache for vhost apache::vhosts: ! "%{::fqdn}": docroot: "/var/www/%{::hostname}" port: "80" redirect_dest: https://%{::fqdn} redirect_status: 'permanent' vhost_name: "%{::fqdn}" ! "%{::fqdn}_ssl": docroot: "/var/www/%{::hostname}" port: "443" vhost_name: "%{::fqdn}" Any hints on how I can once-again make these files generic enough that I don't have to edit the vhost stanzas for new hosts that are created? Edit: I just obtained and installed puppet-agent-1.9.1-1.el7.x86_64 on a test host. This problem is still present. ; rpm -qa puppet-agent puppet-agent-1.9.1-1.el7.x86_64 ; bin/run_puppet Info: Using configured environment 'development' Info: Retrieving pluginfacts Info: Retrieving plugin Info: Loading facts Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Invalid tag '25-%{__fqdn}.conf' at /etc/puppetlabs/code/environments/development/modules/concat/manifests/init.pp:123 at /etc/puppetlabs/code/environments/development/modules/apache/manifests/vhost.pp:623 on node redacted Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>