mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
126 lines
3.0 KiB
YAML
126 lines
3.0 KiB
YAML
---
|
|
- name: Make the app be real
|
|
hosts: os_control[0]:os_control_stg[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
|
|
|
|
vars:
|
|
|
|
roles:
|
|
- role: openshift/project
|
|
project_app: fasjson
|
|
project_description: "Accounts API"
|
|
project_appowners:
|
|
- abompard
|
|
- nils
|
|
- ryanlerch
|
|
- kevin
|
|
tags:
|
|
- apply-appowners
|
|
when: env == "production"
|
|
- role: openshift/project
|
|
project_app: fasjson
|
|
project_description: "Accounts API"
|
|
project_appowners:
|
|
- abompard
|
|
- nils
|
|
- ryanlerch
|
|
- kevin
|
|
tags:
|
|
- apply-appowners
|
|
when: env == "staging"
|
|
|
|
# Declare the service in IPA
|
|
- role: ipa/service
|
|
host: "fasjson{{ env_suffix }}.fedoraproject.org"
|
|
service: HTTP
|
|
|
|
# Setup kerberos delegation
|
|
- role: ipa/servicedelegationtarget
|
|
targetname: ipa-http
|
|
members:
|
|
- { host: "{{ ipa_server }}", service: "HTTP" }
|
|
- role: ipa/servicedelegationrule
|
|
rulename: fasjson
|
|
members:
|
|
- { host: "fasjson{{ env_suffix }}.fedoraproject.org", service: "HTTP" }
|
|
targets:
|
|
- ipa-http
|
|
- ipa-ldap
|
|
# The ipa-ldap delegation target is declared during IPA installation
|
|
|
|
# Keytabs
|
|
- role: openshift/keytab
|
|
keytab_app: fasjson
|
|
keytab_key: http
|
|
keytab_secret_name: fasjson-keytab-http
|
|
keytab_service: HTTP
|
|
keytab_host: "fasjson{{ env_suffix }}.fedoraproject.org"
|
|
|
|
# Session secret key
|
|
- role: openshift/secret-file
|
|
secret_file_app: fasjson
|
|
secret_file_secret_name: session-key
|
|
secret_file_key: session.key
|
|
secret_file_privatefile: "fasjson/session.{{env}}.key"
|
|
|
|
- role: openshift/imagestream
|
|
imagestream_app: fasjson
|
|
imagestream_imagename: fasjson
|
|
|
|
- role: openshift/object
|
|
object_app: fasjson
|
|
object_template: buildconfig.yml.j2
|
|
object_objectname: buildconfig.yml
|
|
|
|
- role: openshift/object
|
|
object_app: fasjson
|
|
object_template: configmap.yml.j2
|
|
object_objectname: configmap.yml
|
|
|
|
- role: openshift/ipa-client
|
|
ipa_client_app: fasjson
|
|
|
|
- role: openshift/object
|
|
object_app: fasjson
|
|
object_file: service.yml
|
|
object_objectname: service.yml
|
|
|
|
- role: openshift/route
|
|
route_app: fasjson
|
|
route_name: fasjson
|
|
route_host: "fasjson{{ env_suffix }}.fedoraproject.org"
|
|
route_serviceport: web
|
|
route_servicename: fasjson-web
|
|
route_annotations:
|
|
haproxy.router.openshift.io/timeout: 5m
|
|
|
|
- role: openshift/object
|
|
object_app: fasjson
|
|
object_template: secret-webhook.yml.j2
|
|
object_objectname: secret-webhook.yml
|
|
|
|
- role: openshift/object
|
|
object_app: fasjson
|
|
object_template: deploymentconfig.yml.j2
|
|
object_objectname: deploymentconfig.yml
|
|
|
|
# - role: openshift/start-build
|
|
# start_build_app: fasjson
|
|
# start_build_buildname: fasjson
|
|
# tags:
|
|
# - never
|
|
# - build
|
|
|
|
# - role: openshift/rollout
|
|
# rollout_app: noggin
|
|
# rollout_dcname: noggin
|
|
# tags:
|
|
# - never
|
|
# - rollout
|