PHPIPAM

Hi Team,

I have installed PHPIPAM on linux centos server now want retrieve the subnet/ipaddress details using Ansible scripts.

Can someone please guide to get the details.

PHPIPAM is basically IPAddress management tool.

Regards,
Naresh K

Ansible is an automation tool.
It can automate whatever you are currently doing manually.
So the question is: how are you currently "retrieving the
subnet/ipaddress details"?

Hi Dick Visser,

Am fine…thanks for asking and how about

I have launched instance(CentOs) in AWS then i have installed PHPIPAM on that successfully and i have created subnets, customers, etc. Now want to see the information of subnets by using Ansilble scripts.

I have installed Ansible in the same machine and executed the below script. getting some authentication error

name: testing
hosts: 127.0.0.1
tasks:

  • name: Login to phpIPAM
    uri:
    validate_certs: false
    url: “http://localhost/index.php?page=login
    method: POST
    body_format: json
    user: “Admin”
    password: “admin123”
    force_basic_auth: yes
    register: ipam_login

Error:

Through Ansible am not connecting PHPIPAM so once its connect then i can use below script to check the subnet information.

  • name: Get subnet information (DNS, gateway, netmask etc.)
    uri:
    url: “{{ phpipam_url }}/subnets/7/”
    method: GET
    headers:
    token: “{{ ipam_login.json.data.token }}”
    status_code: 200
    register: subnet_info

Kindly help me out from this issue.

Regards,
Naresh K

Hi Dick Visser,

Am fine..thanks for asking and how about

I have launched instance(CentOs) in AWS then i have installed PHPIPAM on that successfully and i have created subnets,
customers, etc. Now want to see the information of subnets by using Ansilble scripts.

I have installed Ansible in the same machine and executed the below script. getting some authentication error

name: testing
hosts: 127.0.0.1
tasks:
- name: Login to phpIPAM
uri:
validate_certs: false
url: "http://localhost/index.php?page=login"
method: POST
body_format: json
user: "Admin"
password: "admin123"
force_basic_auth: yes
register: ipam_login

Error:

image.png

Through Ansible am not connecting PHPIPAM so once its connect then i can use below script to check the subnet information.

Sorry, the picture is not intelligible in my Email client. Please post it in a way in can be easily read.

Regards
         Racke