0
Ich habe eine pseudo wieAusführen von Befehlen auf der Grundlage der Rolle innerhalb einer Aufgabe in Capistrano
folgttask :my_task, roles => [:role1, :role2] do
command 1
command 2
command 3
command 4
end
I für role1 Befehl 1 & Befehl 2 wird nur ausgeführt werden soll, Befehl 3 & Befehl 4 für role2. Ist das in Capistrano möglich?
Ich habe versucht,
task :my_task, roles => [:role1, :role2] do
on roles(:role1) do
command 1
command 2
end
on roles(:role2) do
command 3
command 4
end
end
aber offenbar nicht für me..Please Hilfe zur Arbeit :)
Btwn verwende ich v2.15.5 Capistrano
Vielen Dank im Voraus
"Scheint nicht zu funktionieren" bedeutet was? Gibt es einen Fehler? – tadman
Es geht überhaupt nicht zum Codeblock "on roles" :) –
Sie haben gesagt, dass Sie Capistrano v2 ausführen, aber ein Teil der Syntax, die Sie geschrieben haben, ist für v3. Das ist ein Grund, warum es nicht funktioniert. Insbesondere gibt es in v2 keine "on roles (...)" -Syntax. –