# Marking particular hosts when using linode dynamic inventory

**URL:** <https://forum.ansible.com/t/marking-particular-hosts-when-using-linode-dynamic-inventory/31902>\
**Category:** Ansible Project\
**Created:** [January 5, 2020, 10:28pm UTC](https://forum.ansible.com/t/marking-particular-hosts-when-using-linode-dynamic-inventory/31902 "2020-01-05T22:28:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oloryn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/oloryn/32/7904_2.png) [@oloryn](https://forum.ansible.com/u/oloryn)\
**Post date:** [January 5, 2020, 10:28pm UTC](https://forum.ansible.com/t/marking-particular-hosts-when-using-linode-dynamic-inventory/31902/1 "2020-01-05T22:28:03Z")

</div>

I'm just figuring out using Ansible. One of the things I'm trying to  
figure out is marking particular hosts using the linode dynamic  
inventory. E.g. I monitor my hosts using Nagios, so most hosts should  
have the Nagios NRPE server installed. The host containing the Nagios  
server, of course, shouldn't. Also, most hosts use a standard Postfix  
configuration, except of course, for the mail server, which will use a  
differnet Postfix configuration.

On my local hosts, where I maintain a manual inventory, it's fairly  
easy. I add an extra variable to the hosts that need to be marked, and  
test for the existence of that variable in my playbooks. I'm trying to  
figure out how to do something similar for my Linode hosts, where I'm  
using the Linode dynamic inventory plugin. I so far haven't found a way  
to mark a host in the Linode UI that will make its way into the dynamic  
inventory visable from within Ansible. Am I missing something? Or is  
there a way to tell Ansible 'if this particular host shows up, add this  
variable to it' or something similar? Or is there another approach to  
this I should be taking?

Ben

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [January 5, 2020, 11:00pm UTC](https://forum.ansible.com/t/marking-particular-hosts-when-using-linode-dynamic-inventory/31902/2 "2020-01-05T23:00:00Z")

</div>

You can use host\_vars directory to add variables to hosts from any source.

[https://docs.ansible.com/ansible/latest/user\_guide/intro\_inventory.html](https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html)

---

<div class="post-metadata">

**Author:** ![oloryn](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/oloryn/32/7904_2.png) [@oloryn](https://forum.ansible.com/u/oloryn)\
**Post date:** [January 6, 2020, 12:26am UTC](https://forum.ansible.com/t/marking-particular-hosts-when-using-linode-dynamic-inventory/31902/3 "2020-01-06T00:26:02Z")

</div>

Excellent! Thanks!

Ben
