We were previously incorrectly adding double quotes for the alias values. According to the man page it's not required. However, there is a requirement if its a command being pipe. In addition, the man page mentions this for the alias name: The name is a local address (no domain part). Use double quotes when the name contains any special characters such as whitespace, `#', `:', or `@'. The name is folded to lowercase, in order to make database lookups case insensitive. This includes logic to support this automatically. - Add new tests for aliases testing all types - Convert all serverspec tests to inspec - Add Github actions - Update platforms to test Signed-off-by: Lance Albertson <lance@osuosl.org>
22 lines
447 B
Ruby
22 lines
447 B
Ruby
control 'aliases' do
|
|
describe file '/etc/aliases' do
|
|
its('content') do
|
|
should cmp <<~EOF
|
|
#
|
|
# Auto-generated by Chef.
|
|
# Local modifications will be overwritten.
|
|
#
|
|
# See man 5 aliases for format
|
|
postmaster: root
|
|
|
|
foo1: bar
|
|
"foo@bar": foo
|
|
foo2: "|/usr/bin/bar"
|
|
foo3: foo,bar
|
|
foo4: foo@example.com
|
|
foo5: foo,bar
|
|
EOF
|
|
end
|
|
end
|
|
end
|