Hi,

I would like to execute all sudo tasks with a privileged user and not the
current deployment user. Also I don't want to grand the actual deployment 
user any sudo rights.

Is this possible?

For instance by overriding roles, release_roles and so on, determine the 
actual 
task and return Host-Objects with a different user then the default one?

For my own Tasks I was able to do this with the following Code:

module MyMod

  def privileged_roles(*names)

    roles(*names).map do |host|
      host.clone.tap do |new_host|
        new_host.netssh_options[:user] = fetch(:privileged_user)
        new_host.user = fetch(:privileged_user)
      end
    end

  end

end

self.extend MyMod



But with this approach I need to change every recipe and it does not work 
very well with third party 
cap-tasks.


Regards
Dieter

-- 
You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to capistrano+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/capistrano/ad76ccaf-2ab1-4037-abb3-c762a92e539c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to