# Ansible Pull Configuration to get the status of each node

**URL:** <https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478>\
**Category:** Ansible Project\
**Created:** [August 31, 2018, 7:16am UTC](https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478 "2018-08-31T07:16:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SUMIT\_SAHAY](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Post date:** [August 31, 2018, 7:16am UTC](https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478/1 "2018-08-31T07:16:14Z")

</div>

Hello Everyone,

I want to know is there any configuration available in ansible so that we can track the status of playbook for each node while using ansible-pull.

I want to run ansible-pull for 100 of nodes, and if ansible pull not work for some of the node, so that I want to capture the status of each node in master or we can say in the ansible control server. I am using the below command to run the ansible pull, it is working no issue on that but somewhere I want to capture the status of each node in master or ansible control server so that I can use this for audit purpose.

ansible-pull -U [git\_url] --inventory=hosts -k hello\_ansible\_pull.yml -vvvvv --limit remote\_host1-remote\_host2

Looking forward for reply.

Thanks & Regards  
Sumit Sahay  
7044112109

---

<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:** [August 31, 2018, 3:36pm UTC](https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478/2 "2018-08-31T15:36:13Z")

</div>

So there is not 'official' way to do this as `ansible-pull` runs w/o a  
'controller', it just needs a 'source of playbooks'. It is normally  
git, but could basically be anything.

The simplest setup, if you are already using cron, is to use it's mail  
to facility or aggregate it's logs.

You could change your setup to have a centralized controller via  
Awx/Tower and trigger play runs via it's 'host callback' mechanism.  
this would have a fully centralized execution and reporting on all  
your plays.

Another option is to use Ansible callback plugins, which can integrate  
easily with other tools to do this. They enable you to send playbook  
output to many different services (log aggregation, metrics  
monitoring, ARA, etc).

---

<div class="post-metadata">

**Author:** ![SUMIT\_SAHAY](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@SUMIT\_SAHAY](https://forum.ansible.com/u/SUMIT_SAHAY)\
**Post date:** [September 3, 2018, 6:50am UTC](https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478/3 "2018-09-03T06:50:47Z")

</div>

Hi Brian,

As of now I am storing the status as log, as I am not getting any configuration to get the status of the playbook for each node.  
Below are the module I am using to store the status of the playbook.

- name: store the information in local  
lineinfile:  
dest: /tmp/status\_files/status-{{ inventory\_hostname }}.log  
line: ‘{{ inventory\_hostname }} status of {{ inventory\_hostname }} is failed={{rc.failed}} and changed={{rc.changed}}’  
create: yes  
insertafter: EOF  
state: present  
#register: line  
delegate\_to: localhost

Regards  
Sumit Sahay  
07044112109

---

<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:** [September 4, 2018, 1:06pm UTC](https://forum.ansible.com/t/ansible-pull-configuration-to-get-the-status-of-each-node/28478/4 "2018-09-04T13:06:56Z")

</div>

that will only store the status of a task, you need to use a callback  
to store the whole playbook.
