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
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_phpipam' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
pre_tasks:
- import_role:
name: 'keyring'
vars:
keyring__dependent_apt_keys:
- '{{ php__keyring__dependent_apt_keys }}'
- '{{ nginx__keyring__dependent_apt_keys }}'
- '{{ mariadb__keyring__dependent_apt_keys }}'
tags: [ 'role::keyring', 'skip::keyring', 'role::php', 'role::nginx', 'role::mariadb' ]
- import_role:
name: 'php'
tasks_from: 'main_env'
tags: [ 'role::php', 'role::php:env', 'role::logrotate' ]
roles:
- role: apt_preferences
tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
apt_preferences__dependent_list:
- '{{ php__apt_preferences__dependent_list }}'
- '{{ nginx__apt_preferences__dependent_list }}'
- role: cron
tags: [ 'role::cron', 'skip::cron' ]
- role: logrotate
tags: [ 'role::logrotate', 'skip::logrotate' ]
logrotate__dependent_config:
- '{{ php__logrotate__dependent_config }}'
- role: python
tags: [ 'role::python', 'skip::python', 'role::mariadb' ]
python__dependent_packages3:
- '{{ mariadb__python__dependent_packages3 }}'
- '{{ nginx__python__dependent_packages3 }}'
python__dependent_packages2:
- '{{ mariadb__python__dependent_packages2 }}'
- '{{ nginx__python__dependent_packages2 }}'
- role: 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: ferm
tags: [ 'role::ferm', 'skip::ferm' ]
ferm__dependent_rules:
- '{{ nginx__ferm__dependent_rules }}'
- role: 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: mariadb
tags: [ 'role::mariadb', 'skip::mariadb' ]
mariadb__dependent_users:
- '{{ phpipam__mariadb__dependent_users }}'
- role: 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.