Siamak Sadeghianfar
2017-10-31 c16908fb5c019c3edbb6f358fd0a7d69faceb3f0
replaces nexus 2 role with generic nexus role and RH maven repos
3 files deleted
1 files added
3 files modified
5 files renamed
361 ■■■■■ changed files
ansible/configs/archive/opentlc-shared/post_software.yml 2 ●●● patch | view | raw | blame | history
ansible/configs/ocp-demo-lab/post_software.yml 2 ●●● patch | view | raw | blame | history
ansible/configs/ocp-workshop/post_software.yml 2 ●●● patch | view | raw | blame | history
ansible/roles/nexus-container/README.md patch | view | raw | blame | history
ansible/roles/nexus-container/files/defaults/main.yml patch | view | raw | blame | history
ansible/roles/nexus-container/handlers/main.yml patch | view | raw | blame | history
ansible/roles/nexus-container/meta/main.yml patch | view | raw | blame | history
ansible/roles/nexus-container/tasks/main.yml 29 ●●●●● patch | view | raw | blame | history
ansible/roles/nexus-container/templates/vars/main.yml patch | view | raw | blame | history
ansible/roles/nexus2-container/files/addrepo.sh 135 ●●●●● patch | view | raw | blame | history
ansible/roles/nexus2-container/files/nexus2.yaml 112 ●●●●● patch | view | raw | blame | history
ansible/roles/nexus2-container/tasks/main.yml 79 ●●●●● patch | view | raw | blame | history
ansible/configs/archive/opentlc-shared/post_software.yml
@@ -244,7 +244,7 @@
    - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
  run_once: true
  roles:
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus2-container", desired_project: "{{admin_project}}" }
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus-container", desired_project: "{{admin_project}}", nexus_version: "2" }
  tags:
    - env-specific
    - install_nexus
ansible/configs/ocp-demo-lab/post_software.yml
@@ -129,7 +129,7 @@
    - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
  run_once: true
  roles:
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus2-container", desired_project: "{{admin_project}}" }
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus-container", desired_project: "{{admin_project}}", nexus_version: "2" }
  tags:
    - env-specific
    - install_nexus
ansible/configs/ocp-workshop/post_software.yml
@@ -211,7 +211,7 @@
    - "{{ ANSIBLE_REPO_PATH }}/configs/{{ env_type }}/env_vars.yml"
  run_once: true
  roles:
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus2-container", desired_project: "{{admin_project}}" }
    - { role: "{{ ANSIBLE_REPO_PATH }}/roles/nexus-container", desired_project: "{{admin_project}}", nexus_version: "3" }
  tags:
    - env-specific
    - install_nexus
ansible/roles/nexus-container/README.md
ansible/roles/nexus-container/files/defaults/main.yml
ansible/roles/nexus-container/handlers/main.yml
ansible/roles/nexus-container/meta/main.yml
ansible/roles/nexus-container/tasks/main.yml
New file
@@ -0,0 +1,29 @@
---
## Sonatype Nexus Install
##
  - name: Download Nexus template to master
    get_url:
      url: https://raw.githubusercontent.com/OpenShiftDemos/nexus/master/nexus{{nexus_version}}-persistent-template.yaml
      dest: /root/nexus-template.yaml
      mode: 0440
  - name: Check if Nexus was already provisioned
    command: "oc get service nexus -n {{desired_project}}"
    register: install_nexus
    ignore_errors: true
### We should add a check if a pv is already created (nexus requests a 10Gi pv)
  - name: Instantiate Nexus from template
    command: "oc process -f /root/nexus-template.yaml --param=VOLUME_CAPACITY=10Gi --param=MAX_MEMORY=2Gi -n {{desired_project}} | oc create -f - -n {{desired_project}}"
    when: install_nexus | failed
  # looks like we need a better check - it seems we're ready up to several
  # seconds before the router finds out about us, so we might want another
  # http check to make sure nexus is responding
  - name: Wait for Nexus to be running
    command: "oc get dc/nexus -o yaml -n {{desired_project}}"
    register: result
    until: '"availableReplicas: 1" in result.stdout'
    retries: 5
    delay: 60
ansible/roles/nexus-container/templates/vars/main.yml
ansible/roles/nexus2-container/files/addrepo.sh
File was deleted
ansible/roles/nexus2-container/files/nexus2.yaml
File was deleted
ansible/roles/nexus2-container/tasks/main.yml
File was deleted