Method: Unix::Exec#enable_remote_rsyslog
- Defined in:
- lib/beaker/host/unix/exec.rb
#enable_remote_rsyslog(server = 'rsyslog.ops.puppetlabs.net', port = 514) ⇒ Object
417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/beaker/host/unix/exec.rb', line 417 def enable_remote_rsyslog(server = 'rsyslog.ops.puppetlabs.net', port = 514) if !self['platform'].include?('ubuntu') @logger.warn "Enabling rsyslog is only implemented for ubuntu hosts" return end commands = [ "echo '*.* @#{server}:#{port}' >> /etc/rsyslog.d/51-sendrsyslogs.conf", 'systemctl restart rsyslog', ] commands.each do |command| exec(Beaker::Command.new(command)) end true end |