However, the following runbook fails to match any hosts
--- - name: ping test hosts: tl-prod-aweb-[01:02] tasks: ping:
What have I possibly missed? Is this an invalid pattern I'm trying?
Thanks, Jay
Brian Coca
unread,
Dec 8, 2014, 12:28:02 PM12/8/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
try removing the - from the names, use _ instead.
--
Brian Coca
titlei...@gmail.com
unread,
Dec 8, 2014, 4:37:57 PM12/8/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Thanks, that works for the group names. But what if I'm just trying to specify 2 hosts inside a group of 6? Would I have to put them all in groups to get around this?
Is a - (dash) an invalid character for hostnames in Ansible? Or is it splitting on that somewhere when it shouldn't be?
Jay
Brian Coca
unread,
Dec 8, 2014, 4:46:46 PM12/8/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
the - is problematic with python dictionaries, which is what group
names end up being, hosts should be fine.
list slices (hostgroup[:2]) should work
--
Brian Coca
titlei...@gmail.com
unread,
Dec 8, 2014, 5:16:11 PM12/8/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Well, when I try with hosts
ansible -m ping tl-prod-mgdb-[01:03]
No hosts matched
ansible -m ping tl-prod-mgdb-[:03]
No hosts matched
But...this works as long as I change the group name