Git initial commit

This commit is contained in:
Lars Hahn 2023-08-20 10:31:23 +02:00
commit 4472a524cf
8 changed files with 126 additions and 0 deletions

9
LICENSE Executable file
View File

@ -0,0 +1,9 @@
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

3
README.md Executable file
View File

@ -0,0 +1,3 @@
# cloud-openproject
Ansible role to provide openproject as project management software.

25
defaults/main.yml Executable file
View File

@ -0,0 +1,25 @@
---
cloud_apps: /opt
cloud_storage: /opt/storage
cloud_stage: prod
cloud_update: false
domain_external: my-domain.tld
openproject_major: 12
openproject_db:
type: pgsql
name: openproject_db
user: openproject_dbu
pass: openproject_dbpw
port: 5432
host: localhost
openproject_mail_smtp_host: "mail.{{ domain_external }}"
openproject_mail_smtp_port: 25
openproject_mail_smtp_user: "openproject@{{ domain_external }}"
openproject_mail_smtp_pass: ThisCouldBeYourAd!
openproject_mail_smtp_domain: "{{ openproject_mail_smtp_host }}"
openproject_mail_admin: "admin@{{ domain_external }}"
openproject_domain: "localhost"

3
handlers/main.yml Executable file
View File

@ -0,0 +1,3 @@
---
- name: install openproject
command: openproject configure

17
meta/main.yml Executable file
View File

@ -0,0 +1,17 @@
---
galaxy_info:
role_name: openproject
namespace: hahn-cloud
author: Lars Hahn
company: OpenDevChain
license: MIT
description: Role to setup OpenProject.
min_ansible_version: 2.7
platforms:
- name: Debian
versions:
- 11
galaxy_tags:
- openproject
dependencies:
- postgres

45
tasks/main.yml Executable file
View File

@ -0,0 +1,45 @@
---
- name: install requirements for openproject
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg:
- apt-transport-https
- ca-certificates
- gnupg2
- software-properties-common
- curl
- name: install openproject repository key
apt_key:
url: https://dl.packager.io/srv/opf/openproject/key
state: present
- name: install openproject repository
get_url:
url: https://dl.packager.io/srv/opf/openproject/stable/{{ openproject_major }}/installer/{{ ansible_distribution | lower }}/{{ ansible_distribution_major_version }}.repo
dest: /etc/apt/sources.list.d/openproject.list
owner: root
group: root
mode: 644
force: yes
- name: install openproject
apt:
update_cache: yes
state: "{% if cloud_update | bool %}latest{% else %}present{% endif %}"
install_recommends: yes
pkg: openproject
register: openproject_install
- name: template installation file
template:
src: etc/openproject/installer.dat.j2
dest: /etc/openproject/installer.dat
owner: openproject
group: openproject
mode: 0640
notify: install openproject
when: openproject_install.changed

View File

@ -0,0 +1,22 @@
openproject/edition default
postgres/autoinstall reuse
postgres/db_host {{ openproject_db.host | default('localhost') }}
postgres/db_port {{ openproject_db.port | default('5432') }}
postgres/db_username {{ openproject_db.user }}
postgres/db_password {{ openproject_db.pass }}
postgres/db_name {{ openproject_db.name }}
server/autoinstall skip
smtp/autoinstall smtp
smtp/authentication login
smtp/host {{ openproject_mail_smtp_host }}
smtp/port {{ openproject_mail_smtp_port }}
smtp/username {{ openproject_mail_smtp_user }}
smtp/password {{ openproject_mail_smtp_pass }}
smtp/domain {{ openproject_mail_smtp_domain }}
smtp/admin_email {{ openproject_mail_admin }}
memcached/autoinstall install
server/hostname {{ openproject_domain }}
server/ssl no

2
vars/main.yml Executable file
View File

@ -0,0 +1,2 @@
---