Limited Selected Hosts

Hey people,

today I ran the following ansible line: “ansible all:webserver -m command -a “sudo aptitude safe-upgrade -y””. For sure webserver is a group defined in the /etc/hosts.

But it updated all machines. Am I right with my guess that the “all” parameter can’t be limited? Or did I sth. wrong? Or is this behavior somewhere documented and I read over it?

The updates wen’t fine nothing is broken :slight_smile:

Thank you in advance

You’re misunderstanding something. That’s ok, but it is documented.

“all:webserver” means servers in group all, and also webservers"

Naturally all means all servers, so the “and webservers” is redundant

“foo:bar” means “foo, and bar”

while you can say of course “all:&webserver” or “all:!notThisGroup”

it seems you just want to do something uber basic like:

ansible webservers -m …

Alternatively you can also do things like

ansible webservers … --limit bostonDatacenter

Ah it was quite early, without :!webserver it was my fault m(

Thanks and sorry