diff options
-rw-r--r-- | Vagrantfile | 1 | ||||
-rw-r--r-- | lib/leap_cli/commands/run.rb | 13 | ||||
-rw-r--r-- | lib/leap_cli/commands/vagrant.rb | 2 | ||||
-rw-r--r-- | puppet/modules/site_rsyslog/templates/client.conf.erb | 3 |
4 files changed, 12 insertions, 7 deletions
diff --git a/Vagrantfile b/Vagrantfile index 25f26b3b..6f3cf23c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -42,6 +42,7 @@ Vagrant.configure("2") do |config| config.vm.network "forwarded_port", guest: 443, host:4443 # forward pixelated ports config.vm.network "forwarded_port", guest: 8080, host:8080 + config.vm.network "forwarded_port", guest: 4430, host:4430 config.vm.define :"leap_platform", primary: true do |leap_vagrant| end diff --git a/lib/leap_cli/commands/run.rb b/lib/leap_cli/commands/run.rb index 52121035..a12af60e 100644 --- a/lib/leap_cli/commands/run.rb +++ b/lib/leap_cli/commands/run.rb @@ -1,9 +1,10 @@ module LeapCli; module Commands - desc 'runs the specified command on each node.' - arg_name 'FILTER' + desc 'Run a shell command remotely' + long_desc "Runs the specified command COMMAND on each node in the FILTER set. " + + "For example, `leap run 'uname -a' webapp`" + arg_name 'COMMAND FILTER' command :run do |c| - c.flag 'cmd', :arg_name => 'COMMAND', :desc => 'The command to run.' c.switch 'stream', :default => false, :desc => 'If set, stream the output as it arrives. (default: --no-stream)' c.flag 'port', :arg_name => 'SSH_PORT', :desc => 'Override default SSH port used when trying to connect to the server.' c.action do |global, options, args| @@ -15,8 +16,10 @@ module LeapCli; module Commands def run_shell_command(global, options, args) require 'leap_cli/ssh' - cmd = global[:force] ? options[:cmd] : LeapCli::SSH::Options.sanitize_command(options[:cmd]) - nodes = manager.filter!(args) + cmd = args[0] + filter = args[1..-1] + cmd = global[:force] ? cmd : LeapCli::SSH::Options.sanitize_command(cmd) + nodes = manager.filter!(filter) if options[:stream] stream_command(nodes, cmd, options) else diff --git a/lib/leap_cli/commands/vagrant.rb b/lib/leap_cli/commands/vagrant.rb index 8d66a84a..b0ae1cf8 100644 --- a/lib/leap_cli/commands/vagrant.rb +++ b/lib/leap_cli/commands/vagrant.rb @@ -4,7 +4,7 @@ require 'fileutils' module LeapCli; module Commands desc "Manage local virtual machines." - long_desc "This command provides a convient way to manage Vagrant-based virtual machines. If FILTER argument is missing, the command runs on all local virtual machines. The Vagrantfile is automatically generated in 'test/Vagrantfile'. If you want to run vagrant commands manually, cd to 'test'." + long_desc "This command provides a convenient way to manage Vagrant-based virtual machines. If FILTER argument is missing, the command runs on all local virtual machines. The Vagrantfile is automatically generated in 'test/Vagrantfile'. If you want to run vagrant commands manually, cd to 'test'." command [:local, :l] do |local| local.desc 'Starts up the virtual machine(s)' local.arg_name 'FILTER', :optional => true #, :multiple => false diff --git a/puppet/modules/site_rsyslog/templates/client.conf.erb b/puppet/modules/site_rsyslog/templates/client.conf.erb index 553b8373..12d6ea9b 100644 --- a/puppet/modules/site_rsyslog/templates/client.conf.erb +++ b/puppet/modules/site_rsyslog/templates/client.conf.erb @@ -83,7 +83,7 @@ $ActionSendStreamDriverAuthMode anon <% if scope.lookupvar('rsyslog::log_style') == 'debian' -%> # Log auth messages locally -.*;auth,authpriv.none;mail.none -/var/log/syslog +auth,authpriv.* /var/log/auth.log <% elsif scope.lookupvar('rsyslog::log_style') == 'redhat' -%> # Log auth messages locally auth,authpriv.* /var/log/secure @@ -93,6 +93,7 @@ auth,authpriv.* /var/log/secure <% if scope.lookupvar('rsyslog::log_style') == 'debian' -%> # First some standard log files. Log by facility. # +*.*;auth,authpriv.none;mail.none -/var/log/syslog cron.* /var/log/cron.log daemon.* -/var/log/daemon.log kern.* -/var/log/kern.log |