Skip to content

Commit 9fcae36

Browse files
author
Slavek Kabrda
authored
Add requirements.txt file, require pyyaml >= 5.1 (#64)
1 parent a729543 commit 9fcae36

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,20 @@ A callback to send Ansible events and metrics to Datadog.
44

55
## Requirements
66

7-
Ansible >=2.0
7+
Ansible >= 2.0 and Python packages listed in the `requirements.txt` file.
88

9-
The following python libraries are required on the Ansible server:
10-
11-
- [`datadogpy`](https://github.com/DataDog/datadogpy/)
12-
- `pyyaml` (install with `pip install pyyaml`)
13-
- `packaging` (install with `pip install packaging`)
14-
15-
Ansible <=1.9 is no longer supported by this callback. The latest compatible
9+
Ansible <= 1.9 is no longer supported by this callback. The latest compatible
1610
version is tagged with `1.0.2`.
1711

1812
For Mac OS X users: If you're running an older version of OS-installed python (e.g. python 2.7.10), you may need to [upgrade](https://github.com/kennethreitz/requests/issues/3883#issuecomment-281182498) to a newer version of OpenSSL (`pip install pyopenssl idna`).
1913

2014
## Installation
2115

22-
Once the required libraries (see above) have been installed on the server:
23-
24-
1. Copy `datadog_callback.py` to your playbook callback directory (by default
16+
1. Install dependencies by running `pip install -r requirements.txt`.
17+
2. Copy `datadog_callback.py` to your playbook callback directory (by default
2518
`callback_plugins/` in your playbook's root directory). Create the directory
2619
if it doesn't exist.
27-
2. You have 3 ways to set your API key. The callback will first use the
20+
3. You have 3 ways to set your API key. The callback will first use the
2821
environment variable, then the configuration file, then hostvars/vault.
2922

3023
##### Using environment variable

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
datadog
2+
pyyaml>=5.1
3+
packaging

0 commit comments

Comments
 (0)