Compare commits
1 Commits
0.1.13
...
e827dc6809
Author | SHA1 | Date | |
---|---|---|---|
e827dc6809
|
@ -23,15 +23,9 @@ concise area of concern.
|
|||||||
- [`jellyfin`](roles/jellyfin/README.md): Deploy [jellyfin.org](https://jellyfin.org),
|
- [`jellyfin`](roles/jellyfin/README.md): Deploy [jellyfin.org](https://jellyfin.org),
|
||||||
the free software media system for streaming stored media to any device.
|
the free software media system for streaming stored media to any device.
|
||||||
|
|
||||||
- [`keycloak`](roles/keycloak/README.md): Deploy [keycloak](https://www.keycloak.org/),
|
|
||||||
the open source identity and access management solution.
|
|
||||||
|
|
||||||
- [`openproject`](roles/openproject/README.md): Deploys an [openproject.org](https://www.openproject.org)
|
- [`openproject`](roles/openproject/README.md): Deploys an [openproject.org](https://www.openproject.org)
|
||||||
installation using the upstream provided docker-compose setup.
|
installation using the upstream provided docker-compose setup.
|
||||||
|
|
||||||
- [`snipe_it`](roles/snipe_it/README.md): Deploys [Snipe-IT](https://snipeitapp.com/),
|
|
||||||
the free and open-source IT asset (and license) management with a powerful REST API
|
|
||||||
|
|
||||||
- [`vaultwarden`](roles/vaultwarden/README.md): Deploy [vaultwarden](https://github.com/dani-garcia/vaultwarden/),
|
- [`vaultwarden`](roles/vaultwarden/README.md): Deploy [vaultwarden](https://github.com/dani-garcia/vaultwarden/),
|
||||||
an open-source implementation of the Bitwarden Server (formerly Bitwarden\_RS).
|
an open-source implementation of the Bitwarden Server (formerly Bitwarden\_RS).
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
namespace: finallycoffee
|
namespace: finallycoffee
|
||||||
name: services
|
name: services
|
||||||
version: "0.1.13"
|
version: 0.1.5
|
||||||
readme: README.md
|
readme: README.md
|
||||||
authors:
|
authors:
|
||||||
- transcaffeine <transcaffeine@finally.coffee>
|
- transcaffeine <transcaffeine@finally.coffee>
|
||||||
description: Various ansible roles useful for automating infrastructure
|
description: Various ansible roles useful for automating infrastructure
|
||||||
dependencies:
|
dependencies:
|
||||||
"community.crypto": "^2.22.0"
|
"community.crypto": "^2.0.0"
|
||||||
"community.docker": "^4.0.0"
|
"community.docker": "^3.0.0"
|
||||||
license_file: LICENSE.md
|
license_file: LICENSE.md
|
||||||
build_ignore:
|
build_ignore:
|
||||||
- '*.tar.gz'
|
- '*.tar.gz'
|
||||||
@ -19,5 +19,4 @@ tags:
|
|||||||
- hedgedoc
|
- hedgedoc
|
||||||
- jellyfin
|
- jellyfin
|
||||||
- vaultwarden
|
- vaultwarden
|
||||||
- snipeit
|
|
||||||
- docker
|
- docker
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
---
|
|
||||||
- name: Install and configure Snipe-IT
|
|
||||||
hosts: "{{ snipe_it_hosts | default('snipe_it') }}"
|
|
||||||
become: "{{ snipe_it_become | default(true, false) }}"
|
|
||||||
roles:
|
|
||||||
- role: finallycoffee.services.snipe_it
|
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
authelia_version: "4.38.18"
|
authelia_version: "4.38.16"
|
||||||
authelia_user: authelia
|
authelia_user: authelia
|
||||||
authelia_base_dir: /opt/authelia
|
authelia_base_dir: /opt/authelia
|
||||||
authelia_domain: authelia.example.org
|
authelia_domain: authelia.example.org
|
||||||
|
@ -4,7 +4,5 @@
|
|||||||
docker_container:
|
docker_container:
|
||||||
name: "{{ authelia_container_name }}"
|
name: "{{ authelia_container_name }}"
|
||||||
state: started
|
state: started
|
||||||
restart: true
|
restart: yes
|
||||||
comparisons:
|
|
||||||
'*': ignore
|
|
||||||
listen: restart-authelia
|
listen: restart-authelia
|
||||||
|
@ -170,12 +170,7 @@ authelia_config_access_control:
|
|||||||
default_policy: "{{ authelia_config_access_control_default_policy }}"
|
default_policy: "{{ authelia_config_access_control_default_policy }}"
|
||||||
networks: "{{ authelia_config_access_control_networks }}"
|
networks: "{{ authelia_config_access_control_networks }}"
|
||||||
rules: "{{ authelia_config_access_control_rules }}"
|
rules: "{{ authelia_config_access_control_rules }}"
|
||||||
authelia_config_session: >-2
|
authelia_config_session:
|
||||||
{{ authelia_config_session_base
|
|
||||||
| combine(({'redis': authelia_config_session_redis}
|
|
||||||
if authelia_config_session_redis_host else {}), recursive=true)
|
|
||||||
}}
|
|
||||||
authelia_config_session_base:
|
|
||||||
name: "{{ authelia_config_session_name }}"
|
name: "{{ authelia_config_session_name }}"
|
||||||
domain: "{{ authelia_config_session_domain }}"
|
domain: "{{ authelia_config_session_domain }}"
|
||||||
same_site: "{{ authelia_config_session_same_site }}"
|
same_site: "{{ authelia_config_session_same_site }}"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
ghost_domain: ~
|
ghost_domain: ~
|
||||||
ghost_version: "5.109.3"
|
ghost_version: "5.96.0"
|
||||||
ghost_user: ghost
|
ghost_user: ghost
|
||||||
ghost_user_group: ghost
|
ghost_user_group: ghost
|
||||||
ghost_base_path: /opt/ghost
|
ghost_base_path: /opt/ghost
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
gitea_version: "1.23.3"
|
gitea_version: "1.22.3"
|
||||||
gitea_user: git
|
gitea_user: git
|
||||||
gitea_run_user: "{{ gitea_user }}"
|
gitea_run_user: "{{ gitea_user }}"
|
||||||
gitea_base_path: "/opt/gitea"
|
gitea_base_path: "/opt/gitea"
|
||||||
@ -32,7 +32,6 @@ gitea_container_extra_labels: {}
|
|||||||
gitea_container_extra_ports: []
|
gitea_container_extra_ports: []
|
||||||
gitea_container_extra_volumes: []
|
gitea_container_extra_volumes: []
|
||||||
gitea_container_state: started
|
gitea_container_state: started
|
||||||
gitea_container_user: ~
|
|
||||||
|
|
||||||
# container defaults
|
# container defaults
|
||||||
gitea_container_base_volumes:
|
gitea_container_base_volumes:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Ensure gitea user '{{ gitea_user }}' is present
|
- name: Ensure gitea user '{{ gitea_user }}' is present
|
||||||
ansible.builtin.user:
|
ansible.builtin.user:
|
||||||
name: "{{ gitea_user }}"
|
name: "{{ gitea_user }}"
|
||||||
@ -74,7 +75,6 @@
|
|||||||
published_ports: "{{ gitea_container_ports }}"
|
published_ports: "{{ gitea_container_ports }}"
|
||||||
restart_policy: "{{ gitea_container_restart_policy }}"
|
restart_policy: "{{ gitea_container_restart_policy }}"
|
||||||
state: "{{ gitea_container_state }}"
|
state: "{{ gitea_container_state }}"
|
||||||
user: "{{ gitea_container_user | default(omit, true) }}"
|
|
||||||
|
|
||||||
- name: Ensure given configuration is set in the config file
|
- name: Ensure given configuration is set in the config file
|
||||||
ansible.builtin.ini_file:
|
ansible.builtin.ini_file:
|
||||||
|
@ -53,5 +53,5 @@ hedgedoc_container_all_labels: >-2
|
|||||||
{{ hedgedoc_container_base_labels | default({}, true)
|
{{ hedgedoc_container_base_labels | default({}, true)
|
||||||
| combine(hedgedoc_container_labels | default({}, true)) }}
|
| combine(hedgedoc_container_labels | default({}, true)) }}
|
||||||
hedgedoc_container_restart_policy: >-2
|
hedgedoc_container_restart_policy: >-2
|
||||||
{{ (hedgedoc_deployment_method == 'docker')
|
{{ (hedgedoc_deployment_method === 'docker')
|
||||||
| ternary('unless-stopped', 'on-failure') }}
|
| ternary('unless-stopped', 'on-failure') }}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
hedgedoc_user: hedgedoc
|
hedgedoc_user: hedgedoc
|
||||||
hedgedoc_version: "1.10.1"
|
hedgedoc_version: "1.10.0"
|
||||||
|
|
||||||
hedgedoc_state: present
|
hedgedoc_state: present
|
||||||
hedgedoc_deployment_method: docker
|
hedgedoc_deployment_method: docker
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
jellyfin_user: jellyfin
|
jellyfin_user: jellyfin
|
||||||
jellyfin_version: "10.10.5"
|
jellyfin_version: 10.9.11
|
||||||
jellyfin_state: present
|
jellyfin_state: present
|
||||||
|
|
||||||
jellyfin_base_path: /opt/jellyfin
|
jellyfin_base_path: /opt/jellyfin
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# `finallycoffee.services.keycloak` ansible role
|
|
||||||
|
|
||||||
Ansible role for deploying keycloak, currently only supports docker.
|
|
||||||
|
|
||||||
Migrated from `entropia.sso.keycloak`.
|
|
||||||
|
|
||||||
## Required variables
|
|
||||||
|
|
||||||
- `keycloak_database_password` - password for the database user
|
|
||||||
- `keycloak_config_hostname` - public domain of the keycloak server
|
|
||||||
|
|
||||||
## Database configuration
|
|
||||||
|
|
||||||
- `keycloak_database_hostname` - hostname of the database server, defaults to `localhost`
|
|
||||||
- `keycloak_database_username` - username to use when connecting to the database server, defaults to `keycloak`
|
|
||||||
- `keycloak_database_database` - name of the database to use, defaults to `keycloak`
|
|
@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
keycloak_version: "26.1.2"
|
|
||||||
keycloak_container_name: keycloak
|
|
||||||
|
|
||||||
keycloak_container_image_upstream_registry: quay.io
|
|
||||||
keycloak_container_image_upstream_namespace: keycloak
|
|
||||||
keycloak_container_image_upstream_name: keycloak
|
|
||||||
keycloak_container_image_upstream: >-2
|
|
||||||
{{
|
|
||||||
([
|
|
||||||
keycloak_container_image_upstream_registry | default([]),
|
|
||||||
keycloak_container_image_upstream_namespace | default([]),
|
|
||||||
keycloak_container_image_upstream_name,
|
|
||||||
] | flatten | join('/'))
|
|
||||||
}}
|
|
||||||
keycloak_container_image_name: "keycloak:{{ keycloak_version }}-custom"
|
|
||||||
|
|
||||||
keycloak_container_database_vendor: postgres
|
|
||||||
keycloak_base_path: /opt/keycloak
|
|
||||||
keycloak_container_build_directory: "{{ keycloak_base_path }}/build"
|
|
||||||
keycloak_container_build_jar_directory: providers
|
|
||||||
keycloak_container_build_flags: {}
|
|
||||||
keycloak_provider_jars_directory: "{{ keycloak_base_path }}/providers"
|
|
||||||
keycloak_build_provider_jars_directory: "{{ keycloak_container_build_directory }}/{{ keycloak_container_build_jar_directory }}"
|
|
||||||
|
|
||||||
keycloak_database_hostname: localhost
|
|
||||||
keycloak_database_port: 5432
|
|
||||||
keycloak_database_username: keycloak
|
|
||||||
keycloak_database_password: ~
|
|
||||||
keycloak_database_database: keycloak
|
|
||||||
|
|
||||||
keycloak_container_env: {}
|
|
||||||
keycloak_container_labels: ~
|
|
||||||
keycloak_container_volumes: ~
|
|
||||||
keycloak_container_restart_policy: unless-stopped
|
|
||||||
keycloak_container_command: >-2
|
|
||||||
start
|
|
||||||
--db-username {{ keycloak_database_username }}
|
|
||||||
--db-password {{ keycloak_database_password }}
|
|
||||||
--db-url jdbc:postgresql://{{ keycloak_database_hostname }}{{ keycloak_database_port | ternary(':' ~ keycloak_database_port, '') }}/{{ keycloak_database_database }}
|
|
||||||
{{ keycloak_container_extra_start_flags | default([]) | join(' ') }}
|
|
||||||
--proxy-headers=xforwarded
|
|
||||||
--hostname {{ keycloak_config_hostname }}
|
|
||||||
--optimized
|
|
||||||
|
|
||||||
keycloak_config_health_enabled: true
|
|
||||||
keycloak_config_metrics_enabled: true
|
|
||||||
|
|
||||||
keycloak_config_hostname: localhost
|
|
||||||
keycloak_config_admin_username: admin
|
|
||||||
keycloak_config_admin_password: ~
|
|
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
allow_duplicates: true
|
|
||||||
dependencies: []
|
|
||||||
galaxy_info:
|
|
||||||
role_name: keycloak
|
|
||||||
description: Deploy keycloak, the opensource identity and access management solution
|
|
||||||
galaxy_tags:
|
|
||||||
- keycloak
|
|
||||||
- sso
|
|
||||||
- oidc
|
|
||||||
- oauth2
|
|
||||||
- iam
|
|
||||||
- docker
|
|
@ -1,72 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
- name: Ensure build directory exists
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: "{{ keycloak_container_build_directory }}"
|
|
||||||
state: directory
|
|
||||||
recurse: yes
|
|
||||||
mode: 0700
|
|
||||||
tags:
|
|
||||||
- keycloak-build-container
|
|
||||||
|
|
||||||
- name: Ensure provider jars directory exists
|
|
||||||
ansible.builtin.file:
|
|
||||||
name: "{{ keycloak_provider_jars_directory }}"
|
|
||||||
state: directory
|
|
||||||
mode: 0775
|
|
||||||
tags:
|
|
||||||
- keycloak-build-container
|
|
||||||
|
|
||||||
- name: Ensure Dockerfile is templated
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: Dockerfile.j2
|
|
||||||
dest: "{{ keycloak_container_build_directory }}/Dockerfile"
|
|
||||||
mode: 0700
|
|
||||||
register: keycloak_buildfile_info
|
|
||||||
tags:
|
|
||||||
- keycloak-container
|
|
||||||
- keycloak-build-container
|
|
||||||
|
|
||||||
- name: Ensure upstream Keycloak container image '{{ keycloak_container_image_upstream }}:{{ keycloak_version }}' is present
|
|
||||||
community.docker.docker_image:
|
|
||||||
name: "{{ keycloak_container_image_upstream }}:{{ keycloak_version }}"
|
|
||||||
source: pull
|
|
||||||
state: present
|
|
||||||
register: keycloak_container_image_upstream_status
|
|
||||||
tags:
|
|
||||||
- keycloak-container
|
|
||||||
- keycloak-build-container
|
|
||||||
|
|
||||||
- name: Ensure custom keycloak container image '{{ keycloak_container_image_name }}' is built
|
|
||||||
community.docker.docker_image:
|
|
||||||
name: "{{ keycloak_container_image_name }}"
|
|
||||||
build:
|
|
||||||
args:
|
|
||||||
DB_VENDOR: "{{ keycloak_container_database_vendor }}"
|
|
||||||
KC_ADMIN_PASSWORD: "{{ keycloak_config_admin_password }}"
|
|
||||||
dockerfile: "{{ keycloak_container_build_directory }}/Dockerfile"
|
|
||||||
path: "{{ keycloak_container_build_directory }}"
|
|
||||||
source: build
|
|
||||||
state: present
|
|
||||||
force_source: "{{ keycloak_buildfile_info.changed or keycloak_container_image_upstream_status.changed or (keycloak_force_rebuild_container | default(false))}}"
|
|
||||||
register: keycloak_container_image_status
|
|
||||||
tags:
|
|
||||||
- keycloak-container
|
|
||||||
- keycloak-build-container
|
|
||||||
|
|
||||||
- name: Ensure keycloak container is running
|
|
||||||
community.docker.docker_container:
|
|
||||||
name: "{{ keycloak_container_name }}"
|
|
||||||
image: "{{ keycloak_container_image_name }}"
|
|
||||||
env: "{{ keycloak_container_env | default(omit, true) }}"
|
|
||||||
ports: "{{ keycloak_container_ports | default(omit, true) }}"
|
|
||||||
hostname: "{{ keycloak_container_hostname | default(omit) }}"
|
|
||||||
labels: "{{ keycloak_container_labels | default(omit, true) }}"
|
|
||||||
volumes: "{{ keycloak_container_volumes | default(omit, true) }}"
|
|
||||||
restart_policy: "{{ keycloak_container_restart_policy }}"
|
|
||||||
recreate: "{{ keycloak_container_force_recreate | default(false) or (keycloak_container_image_status.changed if keycloak_container_image_status is defined else false) }}"
|
|
||||||
etc_hosts: "{{ keycloak_container_etc_hosts | default(omit) }}"
|
|
||||||
state: started
|
|
||||||
command: "{{ keycloak_container_command }}"
|
|
||||||
tags:
|
|
||||||
- keycloak-container
|
|
@ -1,43 +0,0 @@
|
|||||||
FROM {{ keycloak_container_image_upstream }}:{{ keycloak_version }} as builder
|
|
||||||
|
|
||||||
# Enable health and metrics support
|
|
||||||
ENV KC_HEALTH_ENABLED={{ keycloak_config_health_enabled | ternary('true', 'false') }}
|
|
||||||
ENV KC_METRICS_ENABLED={{ keycloak_config_metrics_enabled | ternary('true', 'false') }}
|
|
||||||
|
|
||||||
# Configure a database vendor
|
|
||||||
ARG DB_VENDOR
|
|
||||||
ENV KC_DB=$DB_VENDOR
|
|
||||||
|
|
||||||
WORKDIR {{ keycloak_container_working_directory }}
|
|
||||||
|
|
||||||
{% if keycloak_container_image_add_local_providers | default(true) %}
|
|
||||||
ADD ./providers/* providers/
|
|
||||||
{% endif %}
|
|
||||||
# Workaround to set correct mode on jar files
|
|
||||||
USER root
|
|
||||||
RUN chmod -R 0770 providers/*
|
|
||||||
USER keycloak
|
|
||||||
|
|
||||||
RUN {{ keycloak_container_working_directory }}/bin/kc.sh --verbose \
|
|
||||||
{% for argument in keycloak_container_build_flags | dict2items(key_name='flag', value_name='value') %}
|
|
||||||
--{{- argument['flag'] -}}{{- argument['value'] | default(false, true) | ternary('=' + argument['value'], '') }} \
|
|
||||||
{% endfor%}
|
|
||||||
build{% if keycloak_container_build_features | default([]) | length > 0 %} \
|
|
||||||
{% endif %}
|
|
||||||
{% if keycloak_container_build_features | default([]) | length > 0 %}
|
|
||||||
--features="{{ keycloak_container_build_features | join(',') }}"
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
FROM {{ keycloak_container_image_upstream }}:{{ keycloak_version }}
|
|
||||||
COPY --from=builder {{ keycloak_container_working_directory }}/ {{ keycloak_container_working_directory }}/
|
|
||||||
|
|
||||||
ENV KC_HOSTNAME={{ keycloak_config_hostname }}
|
|
||||||
ENV KEYCLOAK_ADMIN={{ keycloak_config_admin_username }}
|
|
||||||
ARG KC_ADMIN_PASSWORD
|
|
||||||
{% if keycloak_version | split('.') | first | int > 21 %}
|
|
||||||
ENV KEYCLOAK_ADMIN_PASSWORD=$KC_ADMIN_PASSWORD
|
|
||||||
{% else %}
|
|
||||||
ENV KEYCLOAK_PASSWORD=$KC_ADMIN_PASSWORD
|
|
||||||
{% endif %}
|
|
||||||
ENTRYPOINT ["{{ keycloak_container_working_directory }}/bin/kc.sh"]
|
|
@ -1,3 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
keycloak_container_working_directory: /opt/keycloak
|
|
@ -2,9 +2,9 @@
|
|||||||
openproject_base_path: "/opt/openproject"
|
openproject_base_path: "/opt/openproject"
|
||||||
|
|
||||||
openproject_upstream_git_url: "https://github.com/opf/openproject-deploy.git"
|
openproject_upstream_git_url: "https://github.com/opf/openproject-deploy.git"
|
||||||
openproject_upstream_git_branch: "stable/14"
|
openproject_upstream_git_branch: "stable/13"
|
||||||
|
|
||||||
openproject_compose_project_path: "{{ openproject_base_path }}"
|
openproject_compose_project_path: "{{ openproject_base_path }}/compose"
|
||||||
openproject_compose_project_name: "openproject"
|
openproject_compose_project_name: "openproject"
|
||||||
openproject_compose_project_env_file: "{{ openproject_compose_project_path }}/.env"
|
openproject_compose_project_env_file: "{{ openproject_compose_project_path }}/.env"
|
||||||
openproject_compose_project_override_file: "{{ openproject_compose_project_path }}/docker-compose.override.yml"
|
openproject_compose_project_override_file: "{{ openproject_compose_project_path }}/docker-compose.override.yml"
|
||||||
|
@ -26,13 +26,14 @@
|
|||||||
content: "{{ openproject_compose_overrides | default({}) | to_nice_yaml }}"
|
content: "{{ openproject_compose_overrides | default({}) | to_nice_yaml }}"
|
||||||
|
|
||||||
- name: Ensure containers are pulled
|
- name: Ensure containers are pulled
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose:
|
||||||
project_src: "{{ openproject_compose_project_path }}"
|
project_src: "{{ openproject_compose_project_path }}"
|
||||||
project_name: "{{ openproject_compose_project_name }}"
|
project_name: "{{ openproject_compose_project_name }}"
|
||||||
pull: "missing"
|
pull: true
|
||||||
|
|
||||||
- name: Ensure services are running
|
- name: Ensure services are running
|
||||||
community.docker.docker_compose_v2:
|
community.docker.docker_compose:
|
||||||
project_src: "{{ openproject_compose_project_path }}"
|
project_src: "{{ openproject_compose_project_path }}"
|
||||||
project_name: "{{ openproject_compose_project_name }}"
|
project_name: "{{ openproject_compose_project_name }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
|
build: false
|
||||||
|
@ -11,11 +11,8 @@ for sending email. For installing and configuring MariaDB, see
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Required variables to set are:
|
- `snipe_it_config_app_url`
|
||||||
|
- `snipe_it_config_app_key`
|
||||||
- `snipe_it_domain` - domain name of the snipe-it instance
|
|
||||||
- `snipe_it_config_app_url` - URL where snipe-it will be reachable including protocol and port
|
|
||||||
- `snipe_it_config_app_key` - Laravel application key
|
|
||||||
|
|
||||||
### Database configuration
|
### Database configuration
|
||||||
|
|
||||||
|
@ -47,8 +47,10 @@ snipe_it_config_mail_auto_embed_method: attachment
|
|||||||
snipe_it_config_mail_backup_notification_driver: ~
|
snipe_it_config_mail_backup_notification_driver: ~
|
||||||
snipe_it_config_mail_backup_notification_address: ~
|
snipe_it_config_mail_backup_notification_address: ~
|
||||||
|
|
||||||
snipe_it_config_private_filesystem_disk: "local"
|
snipe_it_config_private_filesystem_disk: >-2
|
||||||
snipe_it_config_public_filesystem_disk: "local_public"
|
{{ snipe_it_data_directory }}/uploads/private
|
||||||
|
snipe_it_config_public_filesystem_disk: >-2
|
||||||
|
{{ snipe_it_data_directory }}/uploads/public
|
||||||
snipe_it_config_allow_backup_delete: false
|
snipe_it_config_allow_backup_delete: false
|
||||||
snipe_it_config_allow_data_purge: false
|
snipe_it_config_allow_data_purge: false
|
||||||
snipe_it_config_image_lib: 'gd'
|
snipe_it_config_image_lib: 'gd'
|
||||||
@ -56,7 +58,7 @@ snipe_it_config_image_lib: 'gd'
|
|||||||
snipe_it_config_log_channel: 'stderr'
|
snipe_it_config_log_channel: 'stderr'
|
||||||
snipe_it_config_log_max_days: 10
|
snipe_it_config_log_max_days: 10
|
||||||
|
|
||||||
snipe_it_config_cookie_name: "_snipe_session"
|
snipe_it_config_cookie_name: ".snipeit_session"
|
||||||
snipe_it_config_cookie_domain: "{{ snipe_it_domain }}"
|
snipe_it_config_cookie_domain: "{{ snipe_it_domain }}"
|
||||||
snipe_it_config_secure_cookies: true
|
snipe_it_config_secure_cookies: true
|
||||||
|
|
||||||
@ -83,29 +85,29 @@ snipe_it_base_config:
|
|||||||
DB_HOST: "{{ snipe_it_config_db_host }}"
|
DB_HOST: "{{ snipe_it_config_db_host }}"
|
||||||
DB_PORT: "{{ snipe_it_config_db_port }}"
|
DB_PORT: "{{ snipe_it_config_db_port }}"
|
||||||
DB_DATABASE: "{{ snipe_it_config_db_database }}"
|
DB_DATABASE: "{{ snipe_it_config_db_database }}"
|
||||||
DB_USERNAME: "{{ snipe_it_config_db_username }}"
|
DB_USERNAME: "{{ snipe_it_config_mail_username }}"
|
||||||
DB_PASSWORD: "{{ snipe_it_config_db_password }}"
|
DB_PASSWORD: "{{ snipe_it_config_db_password }}"
|
||||||
DB_PREFIX: "{{ snipe_it_config_db_prefix | default('null', true) }}"
|
DB_PREFIX: "{{ snipe_it_config_db_prefix }}"
|
||||||
DB_DUMP_PATH: "{{ snipe_it_config_db_dump_path }}"
|
DB_DUMP_PATH: "{{ snipe_it_config_db_dump_path }}"
|
||||||
DB_CHARSET: "{{ snipe_it_config_db_charset }}"
|
DB_CHARSET: "{{ snipe_it_config_db_charset }}"
|
||||||
DB_COLLATION: "{{ snipe_it_config_db_collation }}"
|
DB_COLLATION: "{{ snipe_it_config_db_collation }}"
|
||||||
DB_SSL: "{{ snipe_it_config_db_ssl }}"
|
DB_SSL: "{{ snipe_it_config_db_ssl }}"
|
||||||
DB_SSL_IS_PAAS: "{{ snipe_it_config_db_ssl_is_paas }}"
|
DB_SSL_IS_PAAS: "{{ snipe_it_config_db_ssl_is_paas }}"
|
||||||
DB_SSL_KEY_PATH: "{{ snipe_it_config_db_ssl_key_path | default('null', true) }}"
|
DB_SSL_KEY_PATH: "{{ snipe_it_config_db_ssl_key_path }}"
|
||||||
DB_SSL_CERT_PATH: "{{ snipe_it_config_db_ssl_cert_path | default('null', true) }}"
|
DB_SSL_CERT_PATH: "{{ snipe_it_config_db_ssl_cert_path }}"
|
||||||
DB_SSL_CA_PATH: "{{ snipe_it_config_db_ssl_ca_path | default('null', true) }}"
|
DB_SSL_CA_PATH: "{{ snipe_it_config_db_ssl_ca_path }}"
|
||||||
DB_SSL_CIPHER: "{{ snipe_it_config_db_ssl_cipher | default('null', true) }}"
|
DB_SSL_CIPHER: "{{ snipe_it_config_db_ssl_cipher }}"
|
||||||
DB_SSL_VERIFY_SERVER: "{{ snipe_it_config_db_ssl_verify_server | default('null', true) }}"
|
DB_SSL_VERIFY_SERVER: "{{ snipe_it_config_db_ssl_verify_server }}"
|
||||||
MAIL_MAILER: "{{ snipe_it_config_mail_mailer }}"
|
MAIL_MAILER: "{{ snipe_it_config_mail_mailer }}"
|
||||||
MAIL_HOST: "{{ snipe_it_config_mail_host }}"
|
MAIL_HOST: "{{ snipe_it_config_mail_host }}"
|
||||||
MAIL_PORT: "{{ snipe_it_config_mail_port }}"
|
MAIL_PORT: "{{ snipe_it_config_mail_port }}"
|
||||||
MAIL_USERNAME: "{{ snipe_it_config_mail_username }}"
|
MAIL_USERNAME: "{{ snipe_it_config_mail_username }}"
|
||||||
MAIL_PASSWORD: "{{ snipe_it_config_mail_password }}"
|
MAIL_PASSWORD: "{{ snipe_it_config_mail_password }}"
|
||||||
MAIL_TLS_VERIFY_PEER: "{{ snipe_it_config_mail_tls_verify_peer }}"
|
MAIL_TLS_VERIFY_PEER: "{{ snipe_it_config_mail_tls_verify_peer }}"
|
||||||
MAIL_FROM_ADDR: "{{ snipe_it_config_mail_from_addr | default('null', true) }}"
|
MAIL_FROM_ADDR: "{{ snipe_it_config_mail_from_addr }}"
|
||||||
MAIL_FROM_NAME: "{{ snipe_it_config_mail_from_name | default('null', true) }}"
|
MAIL_FROM_NAME: "{{ snipe_it_config_mail_from_name }}"
|
||||||
MAIL_REPLYTO_ADDR: "{{ snipe_it_config_mail_replyto_addr | default('null', true) }}"
|
MAIL_REPLYTO_ADDR: "{{ snipe_it_config_mail_replyto_addr }}"
|
||||||
MAIL_REPLYTO_NAME: "{{ snipe_it_config_mail_replyto_name | default('null', true) }}"
|
MAIL_REPLYTO_NAME: "{{ snipe_it_config_mail_replyto_name }}"
|
||||||
MAIL_AUTO_EMBED_METHOD: "{{ snipe_it_config_mail_auto_embed_method }}"
|
MAIL_AUTO_EMBED_METHOD: "{{ snipe_it_config_mail_auto_embed_method }}"
|
||||||
MAIL_BACKUP_NOTIFICATION_DRIVER: "{{ snipe_it_config_mail_backup_notification_driver }}"
|
MAIL_BACKUP_NOTIFICATION_DRIVER: "{{ snipe_it_config_mail_backup_notification_driver }}"
|
||||||
MAIL_BACKUP_NOTIFICATION_ADDRESS: "{{ snipe_it_config_mail_backup_notification_address }}"
|
MAIL_BACKUP_NOTIFICATION_ADDRESS: "{{ snipe_it_config_mail_backup_notification_address }}"
|
||||||
@ -127,5 +129,5 @@ snipe_it_base_config:
|
|||||||
|
|
||||||
snipe_it_config: ~
|
snipe_it_config: ~
|
||||||
snipe_it_merged_config: >-2
|
snipe_it_merged_config: >-2
|
||||||
{{ (snipe_it_base_config | default({}, true))
|
{{ snipe_it_base_config | default({}, true)
|
||||||
| combine((snipe_it_config | default({}, true)), recursive=True) }}
|
| combine(snipe_it_config | default({}, true), recursive=True) }}
|
||||||
|
@ -1,26 +1,26 @@
|
|||||||
---
|
---
|
||||||
snipe_it_container_image_registry: docker.io
|
snipe_it_container_container_image_registry: docker.io
|
||||||
snipe_it_container_image_namespace: snipe
|
snipe_it_container_container_image_namespace: snipe
|
||||||
snipe_it_container_image_name: 'snipe-it'
|
snipe_it_container_container_image_name: 'snipe-it'
|
||||||
snipe_it_container_image_tag: ~
|
snipe_it_container_container_image_tag: ~
|
||||||
snipe_it_container_image_flavour: alpine
|
snipe_it_container_container_image_flavour: alpine
|
||||||
snipe_it_container_image_source: pull
|
snipe_it_container_container_image_source: pull
|
||||||
snipe_it_container_image_force_source: >-2
|
snipe_it_container_container_image_force_source: >-2
|
||||||
{{ snipe_it_container_image_tag | default(false, true) | bool }}
|
{{ snipe_it_container_container_image_tag | default(false, true) | bool }}
|
||||||
snipe_it_container_image: >-2
|
snipe_it_container_container_image: >-2
|
||||||
{{
|
{{
|
||||||
([
|
([
|
||||||
snipe_it_container_image_registry | default([], true),
|
snipe_it_container_container_image_registry | default([], true),
|
||||||
snipe_it_container_image_namespace | default([], true),
|
snipe_it_container_container_image_namespace | default([], true),
|
||||||
snipe_it_container_image_name,
|
snipe_it_container_container_image_name,
|
||||||
] | flatten | join('/'))
|
] | flatten | join('/'))
|
||||||
+ ':'
|
+ ':'
|
||||||
+ (snipe_it_container_image_tag | default(
|
+ (vaultwarden_container_image_tag | default(
|
||||||
'v' + snipe_it_version + (
|
'v' + vaultwarden_version + (
|
||||||
((snipe_it_container_image_flavour is string)
|
((snipe_it_container_container_image_flavour is string)
|
||||||
and (snipe_it_container_image_flavour | length > 0))
|
and (snipe_it_container_container_image_flavour | length > 0))
|
||||||
| ternary(
|
| ternary(
|
||||||
'-' + snipe_it_container_image_flavour | default('', true),
|
'-' + snipe_it_container_container_image_flavour | default('', true),
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
@ -28,21 +28,6 @@ snipe_it_container_image: >-2
|
|||||||
))
|
))
|
||||||
}}
|
}}
|
||||||
|
|
||||||
snipe_it_container_env_file: "/var/www/html/.env"
|
snipe_it_container_env_file: "{{ snipe_it_env_file }}"
|
||||||
snipe_it_container_data_directory: "/var/lib/snipeit/"
|
|
||||||
snipe_it_container_volumes:
|
|
||||||
- "{{ snipe_it_data_directory }}:{{ snipe_it_container_data_directory }}:z"
|
|
||||||
|
|
||||||
snipe_it_container_name: 'snipe-it'
|
|
||||||
snipe_it_container_state: >-2
|
|
||||||
{{ (snipe_it_state == 'present') | ternary('started', 'absent') }}
|
|
||||||
snipe_it_container_env: ~
|
|
||||||
snipe_it_container_user: ~
|
snipe_it_container_user: ~
|
||||||
snipe_it_container_ports: ~
|
snipe_it_container_ #TODO
|
||||||
snipe_it_container_labels: ~
|
|
||||||
snipe_it_container_recreate: ~
|
|
||||||
snipe_it_container_networks: ~
|
|
||||||
snipe_it_container_etc_hosts: ~
|
|
||||||
snipe_it_container_dns_servers: ~
|
|
||||||
snipe_it_container_network_mode: ~
|
|
||||||
snipe_it_container_restart_policy: 'unless-stopped'
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
---
|
---
|
||||||
snipe_it_user: snipeit
|
snipe_it_user: snipeit
|
||||||
snipe_it_version: "7.1.15"
|
snipe_it_version: "7.0.13"
|
||||||
snipe_it_domain: ~
|
|
||||||
snipe_it_state: present
|
snipe_it_state: present
|
||||||
snipe_it_deployment_method: docker
|
snipe_it_deployment_method: docker
|
||||||
|
|
||||||
|
@ -14,17 +14,5 @@
|
|||||||
community.docker.docker_container:
|
community.docker.docker_container:
|
||||||
name: "{{ snipe_it_container_name }}"
|
name: "{{ snipe_it_container_name }}"
|
||||||
image: "{{ snipe_it_container_image }}"
|
image: "{{ snipe_it_container_image }}"
|
||||||
env_file: "{{ snipe_it_env_file }}"
|
# more args
|
||||||
env: "{{ snipe_it_container_env | default(omit, true) }}"
|
|
||||||
user: "{{ snipe_it_container_user | default(omit, true) }}"
|
|
||||||
ports: "{{ snipe_it_container_ports | default(omit, true) }}"
|
|
||||||
labels: "{{ snipe_it_container_labels | default(omit, true) }}"
|
|
||||||
volumes: "{{ snipe_it_container_volumes | default(omit, true) }}"
|
|
||||||
networks: "{{ snipe_it_container_networks | default(omit, true) }}"
|
|
||||||
etc_hosts: "{{ snipe_it_container_etc_hosts | default(omit, true) }}"
|
|
||||||
dns_servers: "{{ snipe_it_container_dns_servers | default(omit, true) }}"
|
|
||||||
network_mode: "{{ snipe_it_container_network_mode | default(omit, true) }}"
|
|
||||||
restart_policy: >-2
|
|
||||||
{{ snipe_it_container_restart_policy | default(omit, true) }}
|
|
||||||
recreate: "{{ snipe_it_container_recreate | default(omit, true) }}"
|
|
||||||
state: "{{ snipe_it_container_state }}"
|
state: "{{ snipe_it_container_state }}"
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
|
|
||||||
- name: Ensure snipe-it environment file is {{ snipe_it_state }}
|
- name: Ensure snipe-it environment file is {{ snipe_it_state }}
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ snipe_it_env_file }}"
|
path: "{{ snipe_it_config_file }}"
|
||||||
state: "{{ snipe_it_state }}"
|
state: "{{ snipe_it_state }}"
|
||||||
when: snipe_it_state == 'absent'
|
when: snipe_it_state == 'absent'
|
||||||
|
|
||||||
- name: Ensure snipe-it config directory is {{ snipe_it_state }}
|
- name: Ensure snipe-it config directory is {{ snipe_it_state }}
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ snipe_it_env_file | dirname }}"
|
path: "{{ snipe_it_config_file | dirname }}"
|
||||||
state: "{{ (snipe_it_state == 'present') | ternary('directory', 'absent') }}"
|
state: "{{ (snipe_it_state == 'present') | ternary('directory', 'absent') }}"
|
||||||
owner: "{{ snipe_it_run_user_id }}"
|
owner: "{{ snipe_it_run_user_id }}"
|
||||||
group: "{{ snipe_it_run_group_id }}"
|
group: "{{ snipe_it_run_group_id }}"
|
||||||
@ -45,10 +45,10 @@
|
|||||||
- name: Ensure snipe-it environment file is templated
|
- name: Ensure snipe-it environment file is templated
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
content: |+2
|
content: |+2
|
||||||
{% for entry in snipe_it_merged_config | dict2items %}
|
{% for entry in snipe_it_merged_config | dict2items %}
|
||||||
{{ entry.key }}={{ entry.value }}
|
{{ entry.key }}={{ entry.value }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
dest: "{{ snipe_it_env_file }}"
|
path: "{{ snipe_it_config_file }}"
|
||||||
owner: "{{ snipe_it_run_user_id }}"
|
owner: "{{ snipe_it_run_user_id }}"
|
||||||
group: "{{ snipe_it_run_group_id }}"
|
group: "{{ snipe_it_run_group_id }}"
|
||||||
mode: "0640"
|
mode: "0640"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
vaultwarden_user: vaultwarden
|
vaultwarden_user: vaultwarden
|
||||||
vaultwarden_version: "1.33.2"
|
vaultwarden_version: "1.32.2"
|
||||||
|
|
||||||
vaultwarden_config_file: "/etc/vaultwarden/config.json"
|
vaultwarden_config_file: "/etc/vaultwarden/config.json"
|
||||||
vaultwarden_config_directory: "{{ vaultwarden_config_file | dirname }}"
|
vaultwarden_config_directory: "{{ vaultwarden_config_file | dirname }}"
|
||||||
|
Reference in New Issue
Block a user