# Dynamic inventory with "static" groups?

**URL:** <https://forum.ansible.com/t/dynamic-inventory-with-static-groups/34171>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 9, 2020, 8:47pm UTC](https://forum.ansible.com/t/dynamic-inventory-with-static-groups/34171 "2020-11-09T20:47:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel\_Dimow](https://avatars.discourse-cdn.com/v4/letter/p/3bc359/32.png) [@Pavel\_Dimow](https://forum.ansible.com/u/Pavel_Dimow)\
**Post date:** [November 9, 2020, 8:47pm UTC](https://forum.ansible.com/t/dynamic-inventory-with-static-groups/34171/1 "2020-11-09T20:47:19Z")

</div>

Hi, I am using AWX 10.0.0 with dynamic inventory (python script). Is it possible that AWX ‘remembers’ the group to which host belongs when host goes offline and comes back online few hours later? To illustrate what I _think_ is happening in my setup:

1. inventory script is run, host 192.168.1.1 is added to inventory
2. I manually add the host 192.168.1.1 to the group AUDIO
3. inventory script is run, host 192.168.1.1 _is not online_, host 192.168.1.1 is removed from inventory
4. inventory script is run, host 192.168.1.1 _is online_, host 192.168.1.1 is added to inventory but it’s not in AUDIO group anymore

I would like to avoid to keep the list of hosts that should belong to AUDIO group in inventory script. Is there a better way to do it?
