# Ansible Pull mode

**URL:** <https://forum.ansible.com/t/ansible-pull-mode/22130>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [July 26, 2016, 10:37pm UTC](https://forum.ansible.com/t/ansible-pull-mode/22130 "2016-07-26T22:37:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![knowshan](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@knowshan](https://forum.ansible.com/u/knowshan)\
**Post date:** [July 26, 2016, 10:37pm UTC](https://forum.ansible.com/t/ansible-pull-mode/22130/1 "2016-07-26T22:37:34Z")

</div>

I am looking for suggestions for implementing Ansible pull model. The pull mode is essential for bootstrapping new systems and auto-scaling not launched by Ansible.

I’ve looked at ansible-pull command, but it downloads entire Git repository before running a playbook. This may not be an ideal option for following reasons:

- Inefficient as repository size increases
- Exposes entire repository all nodes and not just the config needed by a particular node

I’ve hacked together following four lines to glue requirements, playbook with a application. The application/node/system gets role requirements first and then runs a playbook which uses those roles. In most cases, playbook includes only a list of roles. It works fine, however, it hasn’t considered various conditions yet.

curl --silent -o requirements.yml “[https://repository/browse/applications/$app/$tier/requirements.yml](https://repository/browse/applications/$app/$tier/requirements.yml)”  
curl --silent -o playbook.yml “[https://repository/browse/applications/$app/$tier/playbook.yml](https://repository/browse/applications/$app/$tier/playbook.yml)”  
ansible-galaxy -vvv install requirements.yml  
ansible-playbook -vvv playbook.yml

I was wondering if anyone has other ideas or workflows or (free) tool suggestions for using Ansible in pull mode.

---

<div class="post-metadata">

**Author:** ![alexey.vazhnov](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alexey.vazhnov](https://forum.ansible.com/u/alexey.vazhnov)\
**Post date:** [July 28, 2016, 12:24pm UTC](https://forum.ansible.com/t/ansible-pull-mode/22130/2 "2016-07-28T12:24:45Z")

</div>

This might be interesting for large projects.
