feat: initial commit
This commit is contained in:
commit
718146cd88
15 changed files with 293 additions and 0 deletions
60
tasks/phpipam.yaml
Normal file
60
tasks/phpipam.yaml
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
---
|
||||
|
||||
- name: "create phpipam config directory"
|
||||
ansible.builtin.file:
|
||||
path: "/mnt/phpipam"
|
||||
state: "directory"
|
||||
owner: "root"
|
||||
group: "root"
|
||||
mode: "0775"
|
||||
|
||||
- name: "create ipam network"
|
||||
community.docker.docker_network:
|
||||
name: "ipam-network"
|
||||
driver: "bridge"
|
||||
state: "present"
|
||||
|
||||
- name: "run phpipam"
|
||||
community.docker.docker_container:
|
||||
|
||||
# docker defaults
|
||||
auto_remove: "no"
|
||||
container_default_behavior: "no_defaults"
|
||||
detach: "yes"
|
||||
init: "no"
|
||||
interactive: "no"
|
||||
log_driver: "json-file"
|
||||
log_options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
memory: "0"
|
||||
paused: "no"
|
||||
privileged: "no"
|
||||
pull: "always"
|
||||
read_only: "no"
|
||||
state: "started"
|
||||
tty: "no"
|
||||
|
||||
# phpipam
|
||||
name: "ipam-app"
|
||||
image: "docker.io/phpipam/phpipam-www:v1.7.4"
|
||||
image_name_mismatch: "recreate"
|
||||
restart_policy: "unless-stopped"
|
||||
networks:
|
||||
- name: "ipam-network"
|
||||
ports:
|
||||
- "{{ phpipam_http_port }}:80"
|
||||
volumes:
|
||||
- "/mnt/phpipam:/phpipam"
|
||||
|
||||
env:
|
||||
|
||||
# phpipam
|
||||
PHPIPAM_DB_HOST: "ipam-db"
|
||||
PHPIPAM_DB_USER: "{{ phpipam_db_user }}"
|
||||
PHPIPAM_DB_PASS: "{{ phpipam_db_password }}"
|
||||
PHPIPAM_DB_NAME: "{{ phpipam_db_name }}"
|
||||
PHPIPAM_DB_PRETTY_PRINT: "1"
|
||||
|
||||
# global
|
||||
TZ: "{{ timezone }}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue