mirror of
https://github.com/saltstack-formulas/template-formula.git
synced 2025-04-17 10:10:28 +00:00
test(platform_finger): extract from shared library
This commit is contained in:
parent
fc90075dd9
commit
d68ed45109
3 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Prepare platform "finger"
|
||||
platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}"
|
||||
platform_finger = system.platform[:finger].split('.').first.to_s
|
||||
|
||||
control 'TEMPLATE package' do
|
||||
title 'should be installed'
|
||||
|
@ -9,7 +9,7 @@ control 'TEMPLATE package' do
|
|||
# Overide by `platform_finger`
|
||||
package_name =
|
||||
case platform_finger
|
||||
when 'centos-6', 'amazon-2018'
|
||||
when 'centos-6', 'amazonlinux-1'
|
||||
'cronie'
|
||||
else
|
||||
'bash'
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Prepare platform "finger"
|
||||
platform_finger = "#{platform[:name]}-#{platform[:release].split('.')[0]}"
|
||||
platform_finger = system.platform[:finger].split('.').first.to_s
|
||||
|
||||
control 'TEMPLATE service' do
|
||||
impact 0.5
|
||||
|
@ -10,7 +10,7 @@ control 'TEMPLATE service' do
|
|||
# Overide by `platform_finger`
|
||||
service_name =
|
||||
case platform_finger
|
||||
when 'centos-6', 'amazon-2018'
|
||||
when 'centos-6', 'amazonlinux-1'
|
||||
'crond'
|
||||
else
|
||||
'systemd-journald'
|
||||
|
|
|
@ -10,7 +10,7 @@ Its goal is to share the libraries between all profiles.
|
|||
|
||||
The `system` library provides easy access to system dependent information:
|
||||
|
||||
- `system.hostname`: return the result of `hostname -s` or `hostnamectl --static` based on the availability of either commands
|
||||
- `system.hostname`: return the result of `hostname -s` or `hostnamectl --static` based on the availability of either command
|
||||
- `system.platform`: based on `inspec.platform`, modify to values that are more consistent from a SaltStack perspective
|
||||
- `system.platform[:family]` provide a family name for Arch
|
||||
- `system.platform[:name]` modify `amazon` to `amazonlinux`
|
||||
|
|
Loading…
Add table
Reference in a new issue