How to add LDAP group for ssh access by ansible playbook?
You don't need to edit /etc/groups since the LDAP group already exists in your LDAP database. You want to let SSH know to use it, try using the AllowGroups setting in /etc/ssh/sshd_config. 

From the manpage: "If specified, login is allowed only for users whose primary 
group or supplementary group list matches one of the patterns.  Only group     names are valid; a numerical group ID is not recognized.  By default, login is allowed for all groups."

See this question for more information