# frozen_string_literal: true | |||||
# -*- mode: ruby -*- | # -*- mode: ruby -*- | ||||
# vi: set ft=ruby : | # vi: set ft=ruby : | ||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | ||||
VAGRANTFILE_API_VERSION = "2" | |||||
VAGRANTFILE_API_VERSION = '2' | |||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||||
config.vm.box = "ubuntu/trusty64" | |||||
config.vm.hostname = "salt" | |||||
config.vm.synced_folder "./", "/srv/salt", id: "vagrant-root" | |||||
config.vm.box = 'ubuntu/trusty64' | |||||
config.vm.hostname = 'salt' | |||||
config.vm.synced_folder './', '/srv/salt', id: 'vagrant-root' | |||||
config.ssh.forward_agent = true | config.ssh.forward_agent = true | ||||
config.vm.provider :virtualbox do |vb| | config.vm.provider :virtualbox do |vb| | ||||
# Use VBoxManage to customize the VM. For example to change memory: | # Use VBoxManage to customize the VM. For example to change memory: | ||||
vb.customize ["modifyvm", :id, "--memory", "1024"] | |||||
end | |||||
if Vagrant.has_plugin?("vagrant-cachier") | |||||
config.cache.scope = :box | |||||
vb.customize ['modifyvm', :id, '--memory', '1024'] | |||||
end | end | ||||
config.cache.scope = :box if Vagrant.has_plugin?('vagrant-cachier') | |||||
# Set up salt-master and minion | # Set up salt-master and minion | ||||
config.vm.provision "shell", path: "dev/setup-salt.sh" | |||||
config.vm.provision 'shell', path: 'dev/setup-salt.sh' | |||||
end | end |
# frozen_string_literal: true | |||||
version = | version = | ||||
case platform[:family] | case platform[:family] | ||||
when 'redhat' | when 'redhat' | ||||
control 'salt packages' do | control 'salt packages' do | ||||
title 'should be installed' | title 'should be installed' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe package(p) do | describe package(p) do | ||||
it { should be_installed } | it { should be_installed } | ||||
its('version') { should eq version } | its('version') { should eq version } |
# frozen_string_literal: true | |||||
control 'salt services' do | control 'salt services' do | ||||
title 'should be running' | title 'should be running' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe service(p) do | describe service(p) do | ||||
it { should be_enabled } | it { should be_enabled } | ||||
it { should be_running } | it { should be_running } |
# frozen_string_literal: true | |||||
version = | version = | ||||
case platform[:family] | case platform[:family] | ||||
when 'redhat' | when 'redhat' | ||||
control 'salt packages' do | control 'salt packages' do | ||||
title 'should be installed' | title 'should be installed' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe package(p) do | describe package(p) do | ||||
it { should be_installed } | it { should be_installed } | ||||
its('version') { should eq version } | its('version') { should eq version } |
# frozen_string_literal: true | |||||
control 'salt services' do | control 'salt services' do | ||||
title 'should be running' | title 'should be running' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe service(p) do | describe service(p) do | ||||
it { should be_enabled } | it { should be_enabled } | ||||
it { should be_running } | it { should be_running } |
# frozen_string_literal: true | |||||
version = | version = | ||||
case platform[:family] | case platform[:family] | ||||
when 'redhat' | when 'redhat' | ||||
control 'salt packages' do | control 'salt packages' do | ||||
title 'should be installed' | title 'should be installed' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe package(p) do | describe package(p) do | ||||
it { should be_installed } | it { should be_installed } | ||||
its('version') { should eq version } | its('version') { should eq version } |
# frozen_string_literal: true | |||||
control 'salt services' do | control 'salt services' do | ||||
title 'should be running' | title 'should be running' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe service(p) do | describe service(p) do | ||||
it { should be_enabled } | it { should be_enabled } | ||||
it { should be_running } | it { should be_running } |
# frozen_string_literal: true | |||||
version = | version = | ||||
case platform[:family] | case platform[:family] | ||||
when 'redhat' | when 'redhat' | ||||
control 'salt packages' do | control 'salt packages' do | ||||
title 'should be installed' | title 'should be installed' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe package(p) do | describe package(p) do | ||||
it { should be_installed } | it { should be_installed } | ||||
its('version') { should eq version } | its('version') { should eq version } |
# frozen_string_literal: true | |||||
control 'salt services' do | control 'salt services' do | ||||
title 'should be running' | title 'should be running' | ||||
%w( | |||||
%w[ | |||||
salt-master | salt-master | ||||
salt-minion | salt-minion | ||||
).each do |p| | |||||
].each do |p| | |||||
describe service(p) do | describe service(p) do | ||||
it { should be_enabled } | it { should be_enabled } | ||||
it { should be_running } | it { should be_running } |