Last active
March 15, 2018 21:09
-
-
Save dword4/7f02b1bd76fe4839f3f367fc945b9eda to your computer and use it in GitHub Desktop.
LibreNMS adding a device with salt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adds a device forcefullly in LNMS via the API | |
lnms_api_add: | |
cmd.run: | |
- name: >- | |
curl -X POST --data-binary '{"hostname":"{{ salt['grains.get']('ip4_interfaces:ens18:0') }}","force_add":"true","port":"161","version":"v2c","community":"public"}' -k -v -H 'X-Auth-Token: SOMEAPITOKEN' 'http://192.168.1.85/api/v0/devices' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment