Merge "Fix beaker on xenial"
This commit is contained in:
commit
8ba2b661ed
|
@ -28,6 +28,11 @@ class accessbot(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
package { 'irc':
|
||||||
|
ensure => installed,
|
||||||
|
provider => openstack_pip,
|
||||||
|
}
|
||||||
|
|
||||||
exec { 'run_accessbot' :
|
exec { 'run_accessbot' :
|
||||||
command => '/usr/local/bin/accessbot -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1',
|
command => '/usr/local/bin/accessbot -c /etc/accessbot/accessbot.config -l /etc/accessbot/channels.yaml >> /var/log/accessbot/accessbot.log 2>&1',
|
||||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||||
|
@ -36,7 +41,8 @@ class accessbot(
|
||||||
subscribe => File['/etc/accessbot/channels.yaml'],
|
subscribe => File['/etc/accessbot/channels.yaml'],
|
||||||
require => [File['/etc/accessbot/channels.yaml'],
|
require => [File['/etc/accessbot/channels.yaml'],
|
||||||
File['/etc/accessbot/accessbot.config'],
|
File['/etc/accessbot/accessbot.config'],
|
||||||
File['/usr/local/bin/accessbot']],
|
File['/usr/local/bin/accessbot'],
|
||||||
|
Package['irc']],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/accessbot':
|
file { '/etc/accessbot':
|
||||||
|
|
|
@ -33,16 +33,7 @@ describe 'basic accessbot' do
|
||||||
it { should be_file }
|
it { should be_file }
|
||||||
it { should be_owned_by 'root' }
|
it { should be_owned_by 'root' }
|
||||||
it { should be_mode 440 }
|
it { should be_mode 440 }
|
||||||
it { should be_grouped_into 'accessbo' }
|
it { should be_grouped_into 'accessbot' }
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'main proccess' do
|
|
||||||
|
|
||||||
describe process("accessbot") do
|
|
||||||
its(:user) { should eq "accessbot" }
|
|
||||||
its(:args) { should match /-c accessbot.config/ }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
file { '/etc/channels.yaml':
|
file { '/etc/channels.yaml':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => 'channels:\n - name: openstack-rainbow-unicorn-pals',
|
content => "access:\n nobody: +v\nglobal:\n nobody:\n - nobody\nchannels:\n - name: openstack-rainbow-unicorn-pals",
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::accessbot':
|
class { '::accessbot':
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
HOSTS:
|
||||||
|
ubuntu-16.04-amd64:
|
||||||
|
roles:
|
||||||
|
- master
|
||||||
|
platform: ubuntu-16.04-amd64
|
||||||
|
hypervisor: none
|
||||||
|
ip: 127.0.0.1
|
||||||
|
CONFIG:
|
||||||
|
type: foss
|
||||||
|
set_env: false
|
|
@ -2,7 +2,15 @@ require 'beaker-rspec'
|
||||||
|
|
||||||
hosts.each do |host|
|
hosts.each do |host|
|
||||||
|
|
||||||
install_puppet
|
# puppet 3 isn't available from apt.puppetlabs.com so install it from the Xenial repos
|
||||||
|
on host, "which apt-get && apt-get install puppet -y", { :acceptable_exit_codes => [0,1] }
|
||||||
|
# otherwise use the beaker helpers to install the yum.puppetlabs.com repo and puppet
|
||||||
|
r = on host, "which yum", { :acceptable_exit_codes => [0,1] }
|
||||||
|
if r.exit_code == 0
|
||||||
|
install_puppet
|
||||||
|
end
|
||||||
|
add_platform_foss_defaults(host, 'unix')
|
||||||
|
|
||||||
|
|
||||||
on host, "mkdir -p #{host['distmoduledir']}"
|
on host, "mkdir -p #{host['distmoduledir']}"
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue