Files
fedora-infra_ansible/playbooks/openshift-apps/docstranslation.yml
2025-01-14 08:37:32 +10:00

97 lines
2.5 KiB
YAML

---
- name: Make the app be real
hosts: os_control[0]:os_control_stg[0]
user: root
gather_facts: false
vars:
ssh_key_path: "{{ private }}/files/docstranslation/id_rsa_docstrans_{{ env_short }}"
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/private/ansible/vars.yml"
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
tasks:
- name: Define Project
ansible.builtin.include_role:
name: openshift/project
vars:
project_app: docstranslation
project_description: Documentation translation
project_appowners:
- asamalik
- darknao
- jibecfed
- misc
tags:
- apply-appowners
- name: Define imagestream
ansible.builtin.include_role:
name: openshift/imagestream
vars:
imagestream_app: docstranslation
imagestream_imagename: builder
- name: Define buildconfig
ansible.builtin.include_role:
name: openshift/object
vars:
object_app: docstranslation
object_objectname: buildconfig.yml
object_template: buildconfig.yml.j2
- name: Start build
ansible.builtin.include_role:
name: openshift/start-build
vars:
start_build_app: docstranslation
start_build_buildname: docstranslation-build
tags:
- never
- build
- name: Define secrets
ansible.builtin.include_role:
name: openshift/object
vars:
object_app: docstranslation
object_objectname: secrets.yml
object_template: secrets.yml.j2
tags:
- deploy-secrets
- name: Define configMap
ansible.builtin.include_role:
name: openshift/object
vars:
object_app: docstranslation
object_objectname: configmap.yml
object_template: configmap.yml.j2
tags:
- deploy-config
- name: Define cron job
ansible.builtin.include_role:
name: openshift/object
vars:
object_app: docstranslation
object_template: cron.yml.j2
object_objectname: cron.yml
tags:
- deploy-cronjob
###############################################
# actions to delete the project from OpenShift
###############################################
# to run: sudo rbac-playbook -l os_masters_stg[0] -t delete openshift-apps/docstranslation.yml
- name: Delete project
ansible.builtin.include_role:
name: openshift/object-delete
vars:
object_delete_app: docstranslation
object_delete_objecttype: project
object_delete_objectname: docstranslation
tags:
- never
- delete