mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-04-20 15:04:57 +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:
|
||||
db: openproject
|
||||
login_user: postgres
|
||||
db: "{{ database_name }}"
|
||||
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: >
|
||||
INSERT INTO ldap_auth_sources
|
||||
(name, host, port, account, account_password, base_dn, attr_login,
|
||||
@ -26,11 +43,8 @@
|
||||
'{{ openproject_ldap.filter_string }}',
|
||||
{{ openproject_ldap.verify_peer }},
|
||||
'{{ openproject_ldap.tls_certificate_string }}'
|
||||
)
|
||||
ON CONFLICT (name) DO NOTHING;
|
||||
become: true
|
||||
vars_files:
|
||||
- vars/ldap.yml
|
||||
);
|
||||
when: ldap_check.query_result | length == 0
|
||||
|
||||
- name: "Check existing LDAP sources"
|
||||
community.postgresql.postgresql_query:
|
||||
|
@ -57,7 +57,7 @@
|
||||
command: >
|
||||
bash -c "cd /app &&
|
||||
{{ rails_env }} {{ rails_cmd }} 'Setting[:{{ item.key }}] = {{ item.value | to_json }}'"
|
||||
loop: "{{ openproject_settings | dict2items }}"
|
||||
loop: "{{ openproject_rails_settings | dict2items }}"
|
||||
|
||||
- name: Setup LDAP
|
||||
include_tasks: ldap.yml
|
||||
|
@ -7,4 +7,12 @@ openproject_plugins_service: "{{docker_compose.directories.services}}plugins/"
|
||||
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
|
||||
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