Ok, so following your suggestions on the hash...
Within Foreman:
openssh_options = { PermitRootLogin => without-passwd, Banner => /etc/udwarning }
openssh_template = openssh/sshd_config.erb
Template looks like (only the appropriate lines):
PermitRootLogin <%= scope.function_options_lookup(['PermitRootLogin','no'])%>
Banner <%= scope.function_options_lookup(['Banner','none']) %>
And the output in the config file on the target host is:
PermitRootLogin PermitRootLogin
Banner Banner
Am I misunderstanding your function_options_lookup? First parameter in the list is the hash key, if it exists, else a default value? It's almost like its taking the quoted string as a literal.
Here's the output of node.rb on the foreman/puppet server. Looks ok, no?
puppet]# ./node.rb tomcat1.int.localnet
---
environment: production
parameters:
resolver_search: "int.localnet,localnet,
servers.udayton.edu"
puppet_ca: firewall.int.localnet
openssh_firewall: "true"
resolver_dns_servers: "192.168.100.1"
monitor_tool: "nagios, puppi"
openssh_options: "{ PermitRootLogin => without-passwd, Banner => /etc/udwarning }"
owner_name: "Admin User"
owner_email: "root@localhost"
puppi: "yes"
openssh_firewall_src: "
192.168.100.0/24"
foreman_env: production
hostgroup: tomcat/tomcat-prod
nrpe_allowed_hosts: "127.0.0.1, 192.168.100.2"
openssh_firewall_dst: "$ipaddress_eth0"
root_pw: "$1$fOfzM8YE$VUkCXmXBrLDfc8Y6ffNz5."
domainname: "Local Internal Network"
puppetmaster: firewall.int.localnet
monitor: "yes"
openssh_template: openssh/sshd_config.erb
classes:
ud-files:
tomcat:
nrpe:
autofs:
"apache::ssl":
sudo:
apache:
puppi:
openssh:
logrotate:
resolver:
iptables:
rsyslog: