I think you’re confusing variables with roles. Roles are groups of servers (anything Enumerable which looks like a hostname, or a server DSN, etc), variables are set and fetched with set() and fetch().
The plugin expects to fetch() a variable with the name of :tar_roles which contains a role name, this role name defaults to the special case :all. Here <https://github.com/wercker/capistrano-scm-copy/blob/ddecae7e912cd819fadb224ae3dee2f25e76704e/lib/capistrano/tasks/copy.rake#L10> the plugin looks up the variable :tar_roles. Thus, if you have: role :our_custom_role, %w{hostone hosttwo hostthree} set :tar_roles, :our_custom_role You’re telling the plugin what it seems to need to know, if you do what you are doing: role :our_custom_role, %w{hostone hosttwo hostthree} set :tar_roles, fetch(:our_custom_role) You’re essentially setting :tar_roles to nothing, since fetch(:a_role_name) will find nothing. Lee Hambley http://lee.hambley.name/ +49 (0) 170 298 5667 On 20 February 2015 at 20:59, <[email protected]> wrote: > Lee, > > turns out the plugin requires tar_roles to be defined, else I see this > weirdness of what looks like trying to run twice. I'd prefer to define the > list of servers once. > > I tried the following but tar_roles does not get defined. Is there a way > have a variable have the same contents as the value of a defined role? > Apparently a role is different than a variable. > > role :OurServers, %w{10.223.132.247} > > set :tar_roles, fetch(:OurServers) > > > Thank you > > -- > 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 [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/c361d1ed-944f-4aec-aa58-468343876755%40googlegroups.com > <https://groups.google.com/d/msgid/capistrano/c361d1ed-944f-4aec-aa58-468343876755%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLXicWx4Sdv0KKKUP%2BsFy8Hp3iqqv3V1L_DOHt14fwnauQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
