From af54ca5dc1a7ad2e93c25f55010178784604d585 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 29 Aug 2022 21:00:19 +0200 Subject: [PATCH] Update to 2022-08-29 21:00 --- roles/penpot/defaults/main.yml | 7 +++---- roles/penpot/tasks/facts.yml | 4 ++++ roles/penpot/templates/config.js.j2 | 2 +- roles/penpot/templates/env.j2 | 7 ++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/roles/penpot/defaults/main.yml b/roles/penpot/defaults/main.yml index 3e75962..b73aa19 100644 --- a/roles/penpot/defaults/main.yml +++ b/roles/penpot/defaults/main.yml @@ -1,7 +1,7 @@ --- # Penpot version to deploy -penpot_version: 1.14.0-beta +penpot_version: 1.15.0-beta # SHould ansible manage upgrades. If False, only the initial install will be done penpot_manage_upgrade: True @@ -10,11 +10,11 @@ penpot_root_dir: /opt/penpot # URL of the archive penpot_archive_url: https://github.com/penpot/penpot/archive/refs/tags/{{ penpot_version }}.tar.gz # Expected sha256 of the archive -penpot_archive_sha256: 734a32a7e1b40e7a8c07bc2f299c38a82efa59551027d7b1ca0dc5400c3e002d +penpot_archive_sha256: ae4266c7c91e093aeb3c00f42294ed364bfdd1d0a2f2ba69721c1416475340de # User under which penpot will run. Will be created penpot_user: penpot -# Public URL where penpot will be avaoilable to users +# Public URL where penpot will be available to users penpot_public_url: https://{{ inventory_hostname }} # Ports used by penpot components @@ -68,7 +68,6 @@ penpot_ldap_search_filter: "{{ ad_auth | ternary('(&(sAMAccountName=:username)(o penpot_ldap_attr_username: "{{ ad_auth | default(False) | ternary('userPrincipalName', 'uid') }}" penpot_ldap_attr_email: mail penpot_ldap_attr_fullname: cn -penpot_ldap_attr_photo: jpegPhoto # Email settings penpot_email_from: no-reply@{{ ansible_domain }} diff --git a/roles/penpot/tasks/facts.yml b/roles/penpot/tasks/facts.yml index f86f701..db4d1be 100644 --- a/roles/penpot/tasks/facts.yml +++ b/roles/penpot/tasks/facts.yml @@ -27,3 +27,7 @@ - set_fact: penpot_db_pass={{ rand_pass }} when: penpot_db_pass is not defined tags: penpot + +- name: Build flag list + set_fact: penpot_flags={{ [ penpot_allow_user_registration | ternary('enable', 'disable') ~ '-registration', penpot_ldap_auth | ternary('enable', 'disable') ~ '-login-with-ldap', penpot_oidc_auth | ternary('enable','disable') ~ '-login-with-oidc' ] }} + tags: penpot diff --git a/roles/penpot/templates/config.js.j2 b/roles/penpot/templates/config.js.j2 index 993451e..4887b3a 100644 --- a/roles/penpot/templates/config.js.j2 +++ b/roles/penpot/templates/config.js.j2 @@ -9,4 +9,4 @@ var penpotLoginWithLDAP = true; {% endif %} var penpotRegistrationEnabled = {{ penpot_allow_user_registration | ternary('true', 'false') }}; var penpotAnalyticsEnabled = false; -var penpotFlags = "{{ penpot_allow_user_registration | ternary('enable-registration', '') }}"; +var penpotFlags = "{{ penpot_flags | join(' ') }}"; diff --git a/roles/penpot/templates/env.j2 b/roles/penpot/templates/env.j2 index 0258722..dd3e3e2 100644 --- a/roles/penpot/templates/env.j2 +++ b/roles/penpot/templates/env.j2 @@ -41,9 +41,8 @@ PENPOT_SMTP_PASSWORD={{ penpot_smtp_pass }} PENPOT_SMTP_TLS={{ penpot_smtp_tls | ternary('true','false') }} PENPOT_SMTP_SSL={{ penpot_smtp_ssl | ternary('true','false') }} -# Feature flags. Right now they are only affect frontend, but in -# future release they will affect to both backend and frontend. -PENPOT_FLAGS="{{ penpot_allow_user_registration | ternary('enable-registration', '') }}" +# Feature flags (registration, auth methods etc.) +PENPOT_FLAGS="{{ penpot_flags | join(' ') }}" # Comma separated list of allowed domains to register. Empty to allow all. PENPOT_REGISTRATION_DOMAIN_WHITELIST="{{ penpot_user_registration_allowed_domains | join(',') }}" @@ -73,6 +72,4 @@ PENPOT_LDAP_BIND_PASSWORD={{ penpot_ldap_bind_pass }} PENPOT_LDAP_ATTRS_USERNAME={{ penpot_ldap_attr_username }} PENPOT_LDAP_ATTRS_EMAIL={{ penpot_ldap_attr_email }} PENPOT_LDAP_ATTRS_FULLNAME={{ penpot_ldap_attr_fullname }} -PENPOT_LDAP_ATTRS_PHOTO={{ penpot_ldap_attr_photo }} -PENPOT_LOGIN_WITH_LDAP=true {% endif %}