# ansible group not working

**URL:** <https://forum.ansible.com/t/ansible-group-not-working/34734>\
**Category:** Ansible Project\
**Created:** [March 8, 2021, 2:24am UTC](https://forum.ansible.com/t/ansible-group-not-working/34734 "2021-03-08T02:24:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [March 8, 2021, 2:24am UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/1 "2021-03-08T02:24:10Z")

</div>

any idea why the below is failing for my hosts pa-mgt01?

 ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)

---

<div class="post-metadata">

**Author:** ![Kiran\_Kumar](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@Kiran\_Kumar](https://forum.ansible.com/u/Kiran_Kumar)\
**Post date:** [March 8, 2021, 3:54am UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/2 "2021-03-08T03:54:25Z")

</div>

check why the windows box ansible doing ssh … that is your clue

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [March 8, 2021, 7:28am UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/3 "2021-03-08T07:28:26Z")

</div>

Hello,

Did you check if your inventory is set up properly? you require to specify the connection mode for windows hosts.

You should read the doc first of all:

[https://docs.ansible.com/ansible/latest/user\_guide/windows\_winrm.html#inventory-options](https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#inventory-options)

and then check with ansible-inventory if your inventory has all the appropriated vars.

Luca

> **(attachments)**
>
> ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)

---

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [March 8, 2021, 1:43pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/4 "2021-03-08T13:43:08Z")

</div>

for the host pa-mgt01 when i put it in windows group in the host file it works. when i put put in [mgmt] it does not work

> **(attachments)**
>
> ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [March 8, 2021, 1:59pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/5 "2021-03-08T13:59:57Z")

</div>

Hello,

read the doc, please. Your inventory setup is missing some variables for that group.

[https://docs.ansible.com/ansible/latest/user\_guide/windows\_winrm.html#inventory-options](https://docs.ansible.com/ansible/latest/user_guide/windows_winrm.html#inventory-options)

Luca

> **(attachments)**
>
> ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)

---

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [March 8, 2021, 2:37pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/6 "2021-03-08T14:37:34Z")

</div>

I am using kerberos. this is my group\_vars file.

what am i missing?

i dont understand

> **(attachments)**
>
> ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)  
> ![Screen Shot 2021-03-08 at 6.36.47 AM.png](https://us1.discourse-cdn.com/ansible/original/2X/8/89e2bd173d4aaeeef560677389f677be50b78519.png)

---

<div class="post-metadata">

**Author:** ![Luca\_remix\_tj\_Lorenz](https://avatars.discourse-cdn.com/v4/letter/l/ea666f/32.png) [@Luca\_remix\_tj\_Lorenz](https://forum.ansible.com/u/Luca_remix_tj_Lorenz)\
**Post date:** [March 8, 2021, 2:48pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/7 "2021-03-08T14:48:42Z")

</div>

Hello,

you’re applying that vars to windows group only, so moving that host to another group doesn’t also move the connection variables. You should study more in depth how inventories and variables work.

Luca

> **(attachments)**
>
> ![Screen Shot 2021-03-07 at 6.24.28 PM.png](https://us1.discourse-cdn.com/ansible/original/2X/a/a70ceaf1008d066264cda3f4f7d661ab66027064.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 8, 2021, 4:40pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/8 "2021-03-08T16:40:03Z")

</div>

You probably want to put it in BOTH groups

---

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [March 8, 2021, 6:20pm UTC](https://forum.ansible.com/t/ansible-group-not-working/34734/9 "2021-03-08T18:20:06Z")

</div>

yes that was it! Thank you
