# Limited Selected Hosts

**URL:** <https://forum.ansible.com/t/limited-selected-hosts/12601>\
**Category:** Ansible Project\
**Created:** [March 29, 2013, 11:59am UTC](https://forum.ansible.com/t/limited-selected-hosts/12601 "2013-03-29T11:59:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lars\_svenson](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@lars\_svenson](https://forum.ansible.com/u/lars_svenson)\
**Post date:** [March 29, 2013, 11:59am UTC](https://forum.ansible.com/t/limited-selected-hosts/12601/1 "2013-03-29T11:59:07Z")

</div>

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 🙂

Thank you in advance

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 29, 2013, 12:17pm UTC](https://forum.ansible.com/t/limited-selected-hosts/12601/2 "2013-03-29T12:17:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lars\_svenson](https://avatars.discourse-cdn.com/v4/letter/l/b782af/32.png) [@lars\_svenson](https://forum.ansible.com/u/lars_svenson)\
**Post date:** [March 29, 2013, 1:04pm UTC](https://forum.ansible.com/t/limited-selected-hosts/12601/3 "2013-03-29T13:04:21Z")

</div>

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

Thanks and sorry
