Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created January 19, 2017 09:27
Show Gist options
  • Save sbeliakou/f05fe1942a154cd2da241cfc8621795a to your computer and use it in GitHub Desktop.
Save sbeliakou/f05fe1942a154cd2da241cfc8621795a to your computer and use it in GitHub Desktop.

Testing playbook:

Dir tree

.
|-- lib
|   `-- timetest.py
`-- test.yml

test.yml

- hosts: localhost
  connection: local

  tasks:
  - timetest:

lib/timetest.py

#!/usr/bin/python

import datetime
import json

date = str(datetime.datetime.now())
print json.dumps({
    "time" : date
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment