Getting started

By default phpIPAM is installed on a separate system account "phpipam", in /srv/www/phpipam/ subdirectory and will be accessible on https://ipam.<domain>/. debops.nginx and debops.php roles are used to configure the required environment.

Example inventory

You can install phpIPAM on a host by adding it to [debops_service_phpipam] group in your Ansible inventory:

[debops_service_phpipam]
hostname

Example playbook

Here's an example playbook which uses debops.phpipam role to install DokuWiki:

---

- name: Manage phpIPAM service
  hosts: [ 'debops_service_phpipam', 'debops_phpipam' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.php/env
      tags: [ 'role::php', 'role::php:env', 'role::apt_preferences', 'role::logrotate' ]

    - role: debops.apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ php__apt_preferences__dependent_list }}'
        - '{{ nginx__apt_preferences__dependent_list }}'

    - role: debops.logrotate
      tags: [ 'role::logrotate', 'skip::logrotate' ]
      logrotate__dependent_config:
        - '{{ php__logrotate__dependent_config }}'

    - role: debops.python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ mariadb__python__dependent_packages3 }}'
        - '{{ nginx__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ mariadb__python__dependent_packages2 }}'
        - '{{ nginx__python__dependent_packages2 }}'

    - role: debops.php
      tags: [ 'role::php', 'skip::php' ]
      php__dependent_packages:
        - '{{ phpipam__php__dependent_packages }}'
      php__dependent_pools:
        - '{{ phpipam__php__dependent_pools }}'
      when: (phpipam__mode is defined and 'webui' in phpipam__mode)

    - role: debops.ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'

    - role: debops.nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_servers:
        - '{{ phpipam__nginx__dependent_servers }}'
      nginx__dependent_upstreams:
        - '{{ phpipam__nginx__dependent_upstreams }}'
      when: (phpipam__mode is defined and 'webui' in phpipam__mode)

    - role: debops.mariadb
      tags: [ 'role::mariadb', 'skip::mariadb' ]
      mariadb__dependent_users:
        - '{{ phpipam__mariadb__dependent_users }}'

    - role: debops.phpipam
      tags: [ 'role::phpipam', 'skip::phpipam' ]

Post-install steps

When Ansible is finished, you need to finish the configuration by opening the https://ipam.<domain> page. There you will be able to finish the installation process.

You can then login and configure it using the administrative interface.

Ansible tags

You can use Ansible --tags or --skip-tags parameters to limit what tasks are performed during Ansible run. This can be used after host is first configured to speed up playbook execution, when you are sure that most of the configuration has not been changed.

Available role tags:

role::phpipam
Main role tag, should be used in the playbook to execute all of the role tasks as well as role dependencies.