**Problem: I’m trying to attach a ansible roles with a hostgroup but attach the roles as their is no api availble in Foreman v2.1. I have gone through foreman documentation [Foreman :: API v2] but couldn’t find any api. Where I can find ansible documentation. Any suggestion?
**Expected outcome: Hostgroup should be attached to ansible roles via api
**Foreman and Proxy versions: 2.1 & 2.1.0-rc3
**Foreman and Proxy plugin versions: 2.1 & 2.1.0-rc3
**Distribution and version: CentOS v7.x86_64 & v2.1
This should be possible once you have the foreman_ansible plugin installed. After installing it, browse the local api docs at https://foreman.example.com/apidoc/ instead of the official ones that have no plugins enabled.
Thank you so much @evgeni for local documentation link actually I wasn’t aware of this link. I’m able to attach roles with a Hostgroup now. Used below details to attach ansible roles with a Hostgroup: