| | |
| | | - name: Check for admin_project project |
| | | command: "oc get project {{admin_project}}" |
| | | register: result |
| | | changed_when: false |
| | | ignore_errors: true |
| | | |
| | | - name: Create admin_project project |
| | | command: "oc adm new-project {{admin_project}} --admin {{admin_user}} --node-selector='env=infra'" |
| | | when: result | failed |
| | |
| | | - env-specific |
| | | - project_request |
| | | tasks: |
| | | |
| | | - name: Copy project request template to master |
| | | copy: |
| | | src: ./files/project-template.yml |
| | |
| | | when: |
| | | - osrelease | version_compare('3.7', '>=') |
| | | |
| | | - name: Fix NFS PV Recycling |
| | | gather_facts: False |
| | | become: yes |
| | | hosts: nodes |
| | | tasks: |
| | | - name: Pull ose-recycler Image |
| | | command: docker pull registry.access.redhat.com/openshift3/ose-recycler:latest |
| | | when: osrelease | version_compare('3.7', '>=') |
| | | |
| | | - name: Tag ose-recycler Image |
| | | command: "docker tag registry.access.redhat.com/openshift3/ose-recycler:latest registry.access.redhat.com/openshift3/ose-recycler:v{{ osrelease }}" |
| | | when: osrelease | version_compare('3.7', '>=') |
| | | |
| | | # Set up Prometheus/Node Exporter/Alertmanager/Grafana |
| | | # on the OpenShift Cluster |
| | | - name: Install Prometheus and Grafana |
| | | gather_facts: False |
| | | become: yes |
| | | hosts: |
| | | - nodes |
| | | - infranodes |
| | | - masters |
| | | - bastions |
| | | vars_files: |
| | | - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml" |
| | | - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_secret_vars.yml" |
| | | roles: |
| | | - role: "{{ ANSIBLE_REPO_PATH }}/roles/openshift-prometheus" |
| | | when: install_prometheus |
| | | tags: |
| | | - prometheus |
| | | |
| | | - name: Install Nexus |
| | | hosts: masters |
| | | gather_facts: False |
| | |
| | | - name: Zabbix for masters |
| | | hosts: masters |
| | | gather_facts: true |
| | | |
| | | become: yes |
| | | vars_files: |
| | | - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml" |
| | |
| | | - install_zabbix |
| | | |
| | | - name: Zabbix for nodes |
| | | |
| | | hosts: |
| | | - nodes |
| | | - infranodes |
| | |
| | | src: "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/files/ocp_report.adoc.j2" |
| | | dest: "{{ ANSIBLE_REPO_PATH }}/workdir/ocp_report_{{ env_type }}-{{ guid }}.adoc" |
| | | when: ocp_report |
| | | |
| | | # Set up Prometheus/Node Exporter/Alertmanager/Grafana |
| | | # on the OpenShift Cluster |
| | | - name: Install Prometheus and Grafana |
| | | gather_facts: False |
| | | become: yes |
| | | hosts: |
| | | - nodes |
| | | - infranodes |
| | | - masters |
| | | - bastions |
| | | vars_files: |
| | | - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml" |
| | | - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_secret_vars.yml" |
| | | roles: |
| | | - role: "{{ ANSIBLE_REPO_PATH }}/roles/openshift-prometheus" |
| | | when: install_prometheus |
| | | tags: |
| | | - prometheus |
| | | |
| | | # Fix NFS PV Recycling |
| | | - name: Fix NFS PV Recycling |
| | | gather_facts: False |
| | | become: yes |
| | | hosts: |
| | | - nodes |
| | | tasks: |
| | | - name: Pull ose-recycler Image |
| | | shell: "docker pull registry.access.redhat.com/openshift3/ose-recycler:latest" |
| | | - name: Tag ose-recycler Image |
| | | shell: "docker tag registry.access.redhat.com/openshift3/ose-recycler:latest registry.access.redhat.com/openshift3/ose-recycler:v{{ osrelease }}" |