- use parameters created by the enc to create external facts - use external facts to generate the motd - use features from unkinben/puppet-enc#22
14 lines
488 B
Plaintext
14 lines
488 B
Plaintext
<%
|
|
# calculate padding for the longest word
|
|
max_length = ['fqdn:', 'os:', 'role:', 'branch:', 'addr:', 'nic:'].max_by(&:length).length
|
|
# helper lambda to right-align text
|
|
align = ->(word) { word.ljust(max_length) }
|
|
%>
|
|
<%= align.call('fqdn:') %> <%= @fqdn %>
|
|
<%= align.call('os:') %> <%= @os_name %> <%= @os_release %>
|
|
<%= align.call('role:') %> <%= @clean_role %>
|
|
<%= align.call('branch:') %> <%= @enc_env %>
|
|
<%= align.call('addr:') %> <%= @addr %>
|
|
<%= align.call('nic:') %> <%= @nic %>
|
|
|