ansible: show the groups of a host

$ ansible -m debug -a var=group_names host.example.com 
host.example.com  | SUCCESS => {                                         
    "group_names": [
        "group1", 
        "group2", 
        "group3", 
        "group4"
    ]
}
Tagged