I want to execute something on all web servers of cluster1. But if I tell Fabric
fab -R cluster1,webserver ...
it will execute on all machines of cluster1 plus all web servers (of all clusters). What can I do?
I want to execute something on all web servers of cluster1. But if I tell Fabric
fab -R cluster1,webserver ...
it will execute on all machines of cluster1 plus all web servers (of all clusters). What can I do?
It can be solved like this:
fab -R cluster1_webserver ...
where cluster1_webserver
is defined in the fabfile to be this:
roledefs['cluster1_webserver'] = list(
set(roledefs['cluster1']) & set(roledefs['webserver']))