Files
fedora-infra_ansible/playbooks/openshift-apps/testdays.yml
Kamil Páral 44df25b2e7 update owners for Quality apps in OpenShift
frantisekz, lbrabec and jskladan left the team. Adamwill should own everything,
and jgroman is our new app developer.

Signed-off-by: Kamil Páral <kparal@redhat.com>
2025-12-10 14:35:07 +00:00

115 lines
3.1 KiB
YAML

---
- name: Prepare setting up the database
hosts: apps_dbserver:apps_dbserver_stg
gather_facts: no
user: root
tasks:
- name: Install psycopg2 for the postgresql ansible modules
ansible.builtin.package:
name: python3-psycopg2
state: present
tags:
- packages
- name: Setup the database
hosts: apps_dbserver:apps_dbserver_stg
gather_facts: no
become: yes
become_user: postgres
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- "/srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml"
tasks:
- name: Create the database user
community.postgresql.postgresql_user:
name: "{{ testdays_db_user }}"
password: "{{ testdays_db_pass }}"
- name: Create the database itself
community.postgresql.postgresql_db:
name: "{{ testdays_db_name }}"
owner: "{{ testdays_db_user }}"
encoding: UTF-8
- name: Test the database creation
community.postgresql.postgresql_db:
name: "{{ testdays_db_name }}"
owner: "{{ testdays_db_user }}"
encoding: UTF-8
- name: Create the database user (resultsdb)
community.postgresql.postgresql_user:
name: "{{ resultsdb_testdays_db_user }}"
password: "{{ resultsdb_testdays_db_pass }}"
- name: Create the database itself (resultsdb)
community.postgresql.postgresql_db:
name: "{{ resultsdb_testdays_db_name }}"
owner: "{{ resultsdb_testdays_db_user }}"
encoding: UTF-8
- name: Test the database creation (resultsdb)
community.postgresql.postgresql_db:
name: "{{ resultsdb_testdays_db_name }}"
owner: "{{ resultsdb_testdays_db_user }}"
encoding: UTF-8
- name: Make the app be real
hosts: os_control_stg[0]:os_control[0]
user: root
gather_facts: false
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
roles:
- role: openshift/project
project_app: testdays
project_description: The Fedora QE testdays application
project_appowners:
- adamwill
- kparal
- jgroman
tags:
- appowners
- role: openshift/object
object_app: testdays
object_template: buildconfig.yml.j2
object_objectname: buildconfig.yml
- role: openshift/object
object_app: testdays
object_template: deployment.yml.j2
object_objectname: deployment.yml
- role: openshift/object
object_app: testdays
object_template: imagestream.yml.j2
object_objectname: imagestream.yml
- role: openshift/object
object_app: testdays
object_template: secret.yml.j2
object_objectname: secret.yml
- role: openshift/object
object_app: testdays
object_file: service.yml
object_objectname: service.yml
- role: openshift/route
route_app: testdays
route_name: testdays
route_host: "testdays{{ env_suffix }}.fedoraproject.org"
route_serviceport: 8080-tcp
route_servicename: testdays
- role: openshift/start-build
start_build_app: testdays
start_build_buildname: testdays-build
start_build_objectname: testdays-build
tags:
- never
- build