mirror of
https://github.com/famedly/ansible-collection-matrix
synced 2024-12-05 00:59:15 +00:00
feat(panopticon): add version as container label
This commit is contained in:
parent
deca0d7f85
commit
b280996a62
3 changed files with 14 additions and 5 deletions
|
@ -1,9 +1,12 @@
|
|||
---
|
||||
# defaults file for panopticon
|
||||
panopticon_db_version: "10.5.4"
|
||||
panopticon_db_user: panopticon
|
||||
panopticon_db_name: panopticon
|
||||
panopticon_db_host: mariadb
|
||||
panopticon_db_port: 3306
|
||||
panopticon_db_docker_labels: {} #override this
|
||||
|
||||
panopticon_version: "no version yet"
|
||||
panopticon_docker_ports: []
|
||||
panopticon_docker_labels: {}
|
||||
panopticon_docker_labels: {} #override this
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
become: yes
|
||||
docker_container:
|
||||
name: panopticon-db
|
||||
image: docker.io/mariadb:10
|
||||
image: "docker.io/mariadb:{{ panopticon_db_version }}"
|
||||
volumes:
|
||||
- /opt/panopticon/database:/var/lib/mysql
|
||||
env:
|
||||
|
@ -13,16 +13,17 @@
|
|||
MYSQL_USER: "{{ panopticon_db_user }}"
|
||||
MYSQL_PASSWORD: "{{ panopticon_db_password }}"
|
||||
restart_policy: unless-stopped
|
||||
labels: "{{ panopticon_db_docker_labels_complete }}"
|
||||
|
||||
- name: launch panopticon
|
||||
become: yes
|
||||
docker_container:
|
||||
name: panopticon
|
||||
image: registry.gitlab.com/famedly/container/panopticon
|
||||
image: registry.gitlab.com/famedly/containers/panopticon
|
||||
pull: true
|
||||
links:
|
||||
- panopticon-db:mariadb
|
||||
labels: "{{ panopticon_docker_labels }}"
|
||||
labels: "{{ panopticon_docker_labels_complete }}"
|
||||
ports: "{{ panopticon_docker_ports }}"
|
||||
env:
|
||||
PANOPTICON_DB_DRIVER: mysql
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
---
|
||||
# vars file for panopticon
|
||||
|
||||
panopticon_db_dsn: "{{ panopticon_db_user }}:{{ panopticon_db_password }}@tcp({{ panopticon_db_host }}:{{ panopticon_db_port }})/{{ panopticon_db_name }}"
|
||||
panopticon_db_docker_labels_complete: "{{ panopticon_db_docker_labels_base | combine(panopticon_db_docker_labels, recursive=True) }}"
|
||||
panopticon_db_docker_labels_base:
|
||||
version: "{{ panopticon_db_version }}"
|
||||
panopticon_docker_labels_complete: "{{ panopticon_docker_labels_base | combine(panopticon_docker_labels) }}"
|
||||
panopticon_docker_labels_base:
|
||||
version: "{{ panopticon_version }}"
|
||||
|
|
Loading…
Reference in a new issue