jbride
2018-09-06 5a04d14e7f8a7421f1f61df2cc4b41303e37f63e
updated maven to 3.5.4 in ocp-client-vm
2 files modified
64 ■■■■■ changed files
ansible/roles/ocp-client-vm/README.md 20 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-client-vm/tasks/packages.yml 44 ●●●●● patch | view | raw | blame | history
ansible/roles/ocp-client-vm/README.md
@@ -36,3 +36,23 @@
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
----
HOST_GUID=dev39
TARGET_HOST="bastion.$HOST_GUID.openshift.opentlc.com"
SSH_USERNAME="xxxx"
SSH_PRIVATE_KEY="xxxx"
WORKLOAD="ocp-client-vm"
# a TARGET_HOST is specified in the command line, without using an inventory file
ansible-playbook -i ${TARGET_HOST}, ./configs/ocp-workloads/ocp-workload.yml \
                 -e"ansible_ssh_private_key_file=~/.ssh/${SSH_PRIVATE_KEY}" \
                 -e"ansible_ssh_user=${SSH_USERNAME}" \
                    -e"ANSIBLE_REPO_PATH=`pwd`" \
                    -e"ocp_workload=${WORKLOAD}" \
                    -e"ACTION=create"
----
ansible/roles/ocp-client-vm/tasks/packages.yml
@@ -1,12 +1,12 @@
#vim: set ft=ansible:
---
- name: Install Openshift Client VM packages
  yum:
    name: "{{ item }}"
    state: present
  with_items:
  - java-1.8.0-openjdk-devel
  - maven
  - docker
  - atomic-openshift-clients
  - skopeo
@@ -19,6 +19,48 @@
  tags:
  - install_openshift_client_vm_packages
- name: Get recent version of maven
  get_url:
    url: http://www-eu.apache.org/dist/maven/maven-3/3.5.4/binaries/apache-maven-3.5.4-bin.tar.gz
    dest: /root/apache-maven.tar.gz
  register: r_geturl
  retries: 5
  delay: 20
  until: r_geturl is succeeded
  tags:
  - install_openshift_client_vm_packages
- name: Unarchive file
  unarchive:
    remote_src: yes
    src: /root/apache-maven.tar.gz
    dest: /root/
  tags:
  - install_openshift_client_vm_packages
- name: Move maven to /usr/local/bin
  copy:
    remote_src: yes
    src: /root/apache-maven-3.5.4/bin/mvn
    dest: /usr/local/bin/mvn
    group: root
    owner: root
    mode: 0755
  tags:
  - install_openshift_client_vm_packages
- name: Cleanup Temp Directory
  file:
    dest: /root/apache-maven-3.5.4
    state: absent
  tags:
  - install_openshift_client_vm_packages
- name: Cleanup downloaded file
  file:
    dest: /root/apache-maven.tar.gz
    state: absent
  tags:
  - install_openshift_client_vm_packages
- name: Download jq-linux64 1.5
  ignore_errors: true
  get_url: