def from_exemplar(**tags): """ Cache the set of packages installed on one host from the specified tags. """ host_string = setup_tunnel([exemplar(**tags)])[0] with settings(host_string=host_string): installed_packages()
def by_tags(**tags): """ Add all running hosts that match the tag names provided as keyword arguments. """ env.hosts.extend(hosts_by_tags(**tags)) env.hosts.sort() env.hosts = setup_tunnel(env.hosts)
def fleet(): """ Return a list of all hosts available and running via the default AWS credentials. Your ability to operate on these hosts will depend upon the ssh credentials that you are using to drive fab. There is likely to be a mismatch between what hosts you can see via IAM managed AWS credentials and which hosts you can actually connect to even if you are using highly privileged AWS pems. """ hosts = _fleet() env.hosts.extend(hosts) env.hosts.sort() env.hosts = setup_tunnel(env.hosts)