ansible/playbooks/openshift-apps/application-monitoring.yml
Ryan Lerch 01ace51513
[ansible-lint] prefix variable names for openshift/project role
ansible-lint requires that variables for roles are prefixed with the
name of the role. This commit prefixes the rvariables for the
openshift/project role with project_ as required by ansible-lint

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-12-03 10:48:44 +01:00

45 lines
1.9 KiB
YAML

---
- name: Make the app be real
hosts: os_masters_stg[0] # only in staging for the ARC deployment
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:
# oc new-project application-monitoring
- role: openshift/project
project_app: application-monitoring
project_description: Hosts the application monitoring operator
project_appowners:
- asaleh
- siddharthvipul1
post_tasks:
- name: Apply node labels
ansible.builtin.command: oc label --overwrite namespace application-monitoring monitoring-key=cpe
- name: Apply node labels for bodhi POC
ansible.builtin.command: oc label --overwrite namespace bodhi monitoring-key=cpe
- name: Make other pods available to the application-monitoring project
ansible.builtin.command: oc adm pod-network make-projects-global application-monitoring
- name: Copy files
ansible.builtin.copy:
src: "{{ roles_path }}/openshift-apps/application-monitoring/files/ dest=/etc/openshift_apps/application-monitoring/"
- name: Prometheus CRDs
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/prometheus-operator-crd/
- name: Prometheus CRD RBAC
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator-crd/
- name: Prometheus Operator RBAC
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus-operator/
- name: Prometheus RBAC
ansible.builtin.command: oc -n application-monitoring apply -f /etc/openshift_apps/application-monitoring/prometheus-operator/example/rbac/prometheus/