mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-20 23:14:56 +02:00
Solved openproject bugs
This commit is contained in:
parent
f9b8f86fce
commit
0b42193d3c
@ -1,7 +1,24 @@
|
|||||||
- name: "Create LDAP auth source"
|
- name: Load LDAP configuration variables
|
||||||
|
include_vars:
|
||||||
|
file: "ldap.yml"
|
||||||
|
|
||||||
|
- name: Check if LDAP source exists
|
||||||
community.postgresql.postgresql_query:
|
community.postgresql.postgresql_query:
|
||||||
db: openproject
|
db: "{{ database_name }}"
|
||||||
login_user: postgres
|
login_user: "{{ database_username }}"
|
||||||
|
login_password: "{{ database_password }}"
|
||||||
|
login_host: "127.0.0.1"
|
||||||
|
login_port: "{{ database_port }}"
|
||||||
|
query: "SELECT 1 FROM ldap_auth_sources WHERE name = '{{ openproject_ldap.name }}' LIMIT 1;"
|
||||||
|
register: ldap_check
|
||||||
|
|
||||||
|
- name: Create LDAP auth source if it doesn't exist
|
||||||
|
community.postgresql.postgresql_query:
|
||||||
|
db: "{{ database_name }}"
|
||||||
|
login_user: "{{ database_username }}"
|
||||||
|
login_password: "{{ database_password }}"
|
||||||
|
login_host: "127.0.0.1"
|
||||||
|
login_port: "{{ database_port }}"
|
||||||
query: >
|
query: >
|
||||||
INSERT INTO ldap_auth_sources
|
INSERT INTO ldap_auth_sources
|
||||||
(name, host, port, account, account_password, base_dn, attr_login,
|
(name, host, port, account, account_password, base_dn, attr_login,
|
||||||
@ -26,11 +43,8 @@
|
|||||||
'{{ openproject_ldap.filter_string }}',
|
'{{ openproject_ldap.filter_string }}',
|
||||||
{{ openproject_ldap.verify_peer }},
|
{{ openproject_ldap.verify_peer }},
|
||||||
'{{ openproject_ldap.tls_certificate_string }}'
|
'{{ openproject_ldap.tls_certificate_string }}'
|
||||||
)
|
);
|
||||||
ON CONFLICT (name) DO NOTHING;
|
when: ldap_check.query_result | length == 0
|
||||||
become: true
|
|
||||||
vars_files:
|
|
||||||
- vars/ldap.yml
|
|
||||||
|
|
||||||
- name: "Check existing LDAP sources"
|
- name: "Check existing LDAP sources"
|
||||||
community.postgresql.postgresql_query:
|
community.postgresql.postgresql_query:
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
command: >
|
command: >
|
||||||
bash -c "cd /app &&
|
bash -c "cd /app &&
|
||||||
{{ rails_env }} {{ rails_cmd }} 'Setting[:{{ item.key }}] = {{ item.value | to_json }}'"
|
{{ rails_env }} {{ rails_cmd }} 'Setting[:{{ item.key }}] = {{ item.value | to_json }}'"
|
||||||
loop: "{{ openproject_settings | dict2items }}"
|
loop: "{{ openproject_rails_settings | dict2items }}"
|
||||||
|
|
||||||
- name: Setup LDAP
|
- name: Setup LDAP
|
||||||
include_tasks: ldap.yml
|
include_tasks: ldap.yml
|
||||||
|
@ -8,3 +8,11 @@ custom_openproject_image: "custom_openproject"
|
|||||||
|
|
||||||
# The following volume doesn't have a practcical function. It just exist to prevent the creation of unnecessary anonymous volumes
|
# The following volume doesn't have a practcical function. It just exist to prevent the creation of unnecessary anonymous volumes
|
||||||
dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"
|
dummy_volume: "{{docker_compose.directories.volumes}}dummy_volume"
|
||||||
|
|
||||||
|
openproject_rails_settings:
|
||||||
|
email_delivery_method: "smtp"
|
||||||
|
smtp_address: "{{ system_email.host }}"
|
||||||
|
smtp_domain: "{{ system_email.domain }}"
|
||||||
|
smtp_user_name: "{{ system_email.username }}"
|
||||||
|
smtp_password: "{{ system_email.password }}"
|
||||||
|
smtp_ssl: false
|
@ -1,7 +0,0 @@
|
|||||||
openproject_settings:
|
|
||||||
email_delivery_method: "smtp"
|
|
||||||
smtp_address: "{{ system_email.host }}"
|
|
||||||
smtp_domain: "{{ system_email.domain }}"
|
|
||||||
smtp_user_name: "{{ system_email.username }}"
|
|
||||||
smtp_password: "{{ system_email.password }}"
|
|
||||||
smtp_ssl: false
|
|
Loading…
x
Reference in New Issue
Block a user