Skip to content

madrisan/saltstack-sdb-phpipam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaltStack SDB Module for {php}IPAM

Codacy Badge License

A SaltStack SDB module for interacting with a {php}IPAM, an open-source web IP address management application (IPAM).

This module requires a configuration profile to be configured in either the minion or, as in our implementation, in the master configuration file (/etc/salt/master.d/phpipam.conf).

This profile requires very little:

phpipam:
  auth:
    user: 'read_api_user'
    password: 'xxxxx'
  driver: phpipam
  url: https://ipam.mydomain.com

Where url is the URL of the phpipam server and auth.user and auth.password the credential of a user account created in the phpipam application. If authentication is successfull, an API token will be received and transparently included in the header of all the API requests.

This Python module should be saved as salt/_modules/sdb/phpipam.py.

API documentation

URL: https://phpipam.net/api/api_documentation/

Usage

sdb.get

Get the IP address(es) associated to a given hostname, by querying the phpipam server.

Example of output (IP:netmask:subnet description:subnet ID):

$ sudo salt-run sdb.get sdb://phpipam/HOSTNAME
10.0.5.18:255.255.255.0:VLAN Front:5
10.1.7.18:255.255.255.0:VLAN Back:7

About

SaltStack SDB interface for querying a {php}IPAM server

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages