thank you so much Vladimir and Jorge
Regards,
Suresh
On Fri, Oct 29, 2021 at 3:11 AM Vladimir Botka wrote:
> On Fri, 29 Oct 2021 01:57:17 +0530
> Suresh Karpurapu wrote:
>
> > > > # grep AllowGroups /etc/ssh/sshd_config
> > > > AllowGroups x y z
> > > >
> > > > # grep AllowGroups
On Fri, 29 Oct 2021 01:57:17 +0530
Suresh Karpurapu wrote:
> > > # grep AllowGroups /etc/ssh/sshd_config
> > > AllowGroups x y z
> > >
> > > # grep AllowGroups /etc/ssh/sshd_config
> > > AllowGroups x y z a <-group "a" needs to be added at
> > > the end of the line
> >
Try this:
https://dpaste.com/5ENHWDV7Q
Remember to update the sshd_config to the proper path ie.
/etc/ssh/sshd_config
➜ ~ grep '^AllowGroups' sshd_config
AllowGroups a b c
➜ ~ ansible-playbook -i localhost, allow.yml
PLAY [Configure sshd groups]
Thank you so much Vladimir,
How can we loop if we need to append multiple groups.
Regards,
Suresh
On Thu, 28 Oct 2021, 6:21 pm Vladimir Botka, wrote:
> On Thu, 28 Oct 2021 05:28:27 -0700 (PDT)
> Suresh Karpurapu wrote:
>
> > # grep AllowGroups /etc/ssh/sshd_config
> > AllowGroups x y z
> >
On Thu, 28 Oct 2021 05:28:27 -0700 (PDT)
Suresh Karpurapu wrote:
> # grep AllowGroups /etc/ssh/sshd_config
> AllowGroups x y z
>
> # grep AllowGroups /etc/ssh/sshd_config
> AllowGroups x y z a <-group "a" needs to be added at
> the end of the line
Enable *backrefs*
Hi Experts,
I would like to append the new group to the existing AllowGroups in
/etc/ssh/sshd_config file without disturbing the existing group. I tried
with lineinfile module but unfortunately its failing or overwriting
existing groups. Can anyone please provide the clue on logic?
existing