# New Relic Deployment

**URL:** <https://forum.ansible.com/t/new-relic-deployment/31955>\
**Category:** Ansible Project\
**Created:** [January 13, 2020, 12:49pm UTC](https://forum.ansible.com/t/new-relic-deployment/31955 "2020-01-13T12:49:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Garry\_Taylor](https://avatars.discourse-cdn.com/v4/letter/g/9de053/32.png) [@Garry\_Taylor](https://forum.ansible.com/u/Garry_Taylor)\
**Post date:** [January 13, 2020, 12:49pm UTC](https://forum.ansible.com/t/new-relic-deployment/31955/1 "2020-01-13T12:49:43Z")

</div>

Hello,

I have been using this module for several years now, to record a deployment in New Relic  
[https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/monitoring/newrelic\_deployment.py](https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/monitoring/newrelic_deployment.py)

I now see on the New Relic website that a variable called ‘timestamp’ can now be used to record the date/time in the past. Which is very useful.  
See this as an example [https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments#api](https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/record-monitor-deployments#api).

```auto
curl -X POST "https://api.newrelic.com/v2/applications//deployments.json" \
     -H "X-Api-Key:" \
     -i \
     -H "Content-Type: application/json" \
     -d \
'{
  "deployment": {
    "revision": "",
    "changelog": "",
    "description": "",
    "user": "",
    "timestamp": ""
  }
}' 

```

however, after editing the below file to include the timestamp variable and then run my Ansible Playbook, the timestamp in New Relic is the current date/time (13th January) the API POSTed the request, even though the timestamp variable was for January 1st 2020.

/usr/lib/python2.7/site-packages/ansible/modules/monitoring/newrelic\_deployment.py

#!/usr/bin/python

# -_- coding: utf-8 -_-
