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

Dear Ansible experts and developers.
Hello,
I’ve got one question regarding Ansible1.5 .

I’ve been using [:] 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?

I had a similar issue which should be fixed in develop – hopefully this will make it to a 1.5.1 release:

https://github.com/ansible/ansible/issues/6331

Thanks for info, James.

I tried shiny 1.5.1 today, but it didn’t work either :slight_smile:
I’ll probably raise issue about this…

2014年3月11日火曜日 3時47分04秒 UTC+9 James Martin: