I need to grab specific sub group from my inventory file and use it in ansible playbook correctly.
all:
children:
development:
children:
ntp_servers:
hosts:
ntp01:
ntp02:
services:
children:
chatbot:
children:
app:
hosts:
chatbot-app01:
chatbot-app02:
db:
hosts:
chatbot-db01:
chatbot-db02:
dice:
children:
app:
hosts:
dice-app01:
dice-app02:
db:
hosts:
dice-db01:
dice-db02:
dice-db03:
redis:
hosts:
dice-redis01:
dice-redis02:
For example I want to grab app subgroup of chatbot group. Can anyone give example playbook how to reference chatbot.app group?
I used like this but this seems to be wrong statement.
- hosts: chatbot:app
roles:
- chatbot