# ansible-pull: possible to use with add\_hosts and remote targets?

**URL:** <https://forum.ansible.com/t/ansible-pull-possible-to-use-with-add-hosts-and-remote-targets/29149>\
**Category:** Ansible Project\
**Created:** [November 29, 2018, 9:54am UTC](https://forum.ansible.com/t/ansible-pull-possible-to-use-with-add-hosts-and-remote-targets/29149 "2018-11-29T09:54:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![olapodrido](https://avatars.discourse-cdn.com/v4/letter/o/50afbb/32.png) [@olapodrido](https://forum.ansible.com/u/olapodrido)\
**Post date:** [November 29, 2018, 9:54am UTC](https://forum.ansible.com/t/ansible-pull-possible-to-use-with-add-hosts-and-remote-targets/29149/1 "2018-11-29T09:54:34Z")

</div>

Hi!

I am maintaining a set of servers which host some LXD containers on them.

The playbooks to install them go like this: First playbook connects to the LXD host, installs apps and services including the containers that are configured for it. A second playbook connects to this host, loops through its container configuration and adds them to an in-memory inventory group. These containers are then installed in a second play in this playbook, using the in-memory inventory group created just before.

This is working beautifully when used via ansible-playbook in push mode. But with ansible-pull, the add\_host group gets defined, but cannot be used as inventory group later.

See this stripped down demonstration code:

**Playbook (debug.yml):**
