PHPIPAM

25 views
Skip to first unread message

Naresh Kasula

unread,
Jun 1, 2020, 4:30:27 AM6/1/20
to Ansible Project
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

Dick Visser

unread,
Jun 1, 2020, 4:27:31 PM6/1/20
to ansible...@googlegroups.com
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"?
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/f384808e-3dd3-4f40-8e0b-c7908f189278%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Naresh Kasula

unread,
Jun 2, 2020, 2:48:59 AM6/2/20
to ansible...@googlegroups.com
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.

- 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

Stefan Hornburg (Racke)

unread,
Jun 2, 2020, 3:50:44 AM6/2/20
to ansible...@googlegroups.com
On 6/2/20 8:48 AM, Naresh Kasula wrote:
> 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

>
> - 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
>
> On Tue, Jun 2, 2020 at 1:57 AM Dick Visser <dick....@geant.org <mailto:dick....@geant.org>> wrote:
>
> 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"?
>
> On Mon, 1 Jun 2020 at 10:30, Naresh Kasula <kasulan...@gmail.com <mailto:kasulan...@gmail.com>> wrote:
> >
> > 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
> >
> > --
> > You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f384808e-3dd3-4f40-8e0b-c7908f189278%40googlegroups.com.
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-project%2Bunsu...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwOaGqrCdfM7FLg9UESZxOe1rZQurQdX0WcXcx%2BQP0NbMg%40mail.gmail.com.
>
>
>
> --
> K.Naresh
> Mob No:9916045741
>
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> ansible-proje...@googlegroups.com <mailto:ansible-proje...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAO532ODrYVVJ7Jo%2B%2BJ-fw_yjT7o28ojn2%2B6W8zs9yRrSXtopmQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CAO532ODrYVVJ7Jo%2B%2BJ-fw_yjT7o28ojn2%2B6W8zs9yRrSXtopmQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


--
Ecommerce and Linux consulting + Perl and web application programming.
Debian and Sympa administration. Provisioning with Ansible.

signature.asc
Reply all
Reply to author
Forward
0 new messages