Guillaume Coré
2017-12-12 5c01d0850ff9240245cc18f55185b2fc39cac90f
Fix NFS ose-recycler: add condition on version
1 files modified
68 ■■■■ changed files
ansible/configs/ocp-workshop/post_software.yml 68 ●●●● patch | view | raw | blame | history
ansible/configs/ocp-workshop/post_software.yml
@@ -110,7 +110,9 @@
    - 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
@@ -161,7 +163,6 @@
    - env-specific
    - project_request
  tasks:
    - name: Copy project request template to master
      copy:
        src: ./files/project-template.yml
@@ -237,6 +238,38 @@
    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
@@ -253,7 +286,6 @@
- name: Zabbix for masters
  hosts: masters
  gather_facts: true
  become: yes
  vars_files:
    - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
@@ -272,7 +304,6 @@
    - install_zabbix
- name: Zabbix for nodes
  hosts:
    - nodes
    - infranodes
@@ -366,34 +397,3 @@
        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 }}"