Can't limit hosts to run with hosts: WEB[:1] in Ansible 1.5

28 views
Skip to first unread message

t goto

unread,
Mar 10, 2014, 3:43:51 AM3/10/14
to ansible...@googlegroups.com
Dear Ansible experts and developers. 
Hello,
I've got one question regarding Ansible1.5 . 

I've been using [:<number>] in hosts section of playbook so that I can limit the number of server to run.
Below is an example.

"WEB" group consists from 3 servers ..
[WEB]
server01
server02
server03

and I want to run following playbook in ANY one of WEB group. So I used [:1] here.
- name: Playbook Temp
  hosts
: WEB[:1]
  sudo
: yes


These codes worked at Ansible 1.4 but not for 1.5. All I got was "skipping: no hosts matched".
Any advice?

James Martin

unread,
Mar 10, 2014, 2:47:04 PM3/10/14
to ansible...@googlegroups.com
I had a similar issue which should be fixed in develop -- hopefully this will make it to a 1.5.1 release:



--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/22185be0-7eb3-4f7c-aebf-8de3406754fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

t goto

unread,
Mar 11, 2014, 5:56:55 AM3/11/14
to ansible...@googlegroups.com
Thanks for info, James.

I tried shiny 1.5.1 today, but it didn't work either :)
I'll probably raise issue about this..

2014年3月11日火曜日 3時47分04秒 UTC+9 James Martin:
Reply all
Reply to author
Forward
0 new messages