Guillaume Coré
2019-04-03 cdff1977500e905f3321455f6690cc481f66b0f9
bastion: do not install k8s / openshift python modules by default

Try to fix:

"delta": "0:00:05.712348", "end": "2019-04-01 14:48:43.707984", "msg": $
non-zero return code", "rc": 1, "start": "2019-04-01 14:48:37.995636", "stderr": "Traceback (most recent call last):\n File \"/usr/sbin/ipa-client-install\", line
22, in <module>\n from ipaclient.install import ipa_client_install\n File \"/usr/lib/python2.7/site-packages/ipaclient/install/ipa_client_install.py\", line 5,
in <module>\n from ipaclient.install import client\n File \"/usr/lib/python2.7/site-packages/ipaclient/install/client.py\", line 34, in <module>\n from ipal$
b import api, errors, x509\n File \"/usr/lib/python2.7/site-packages/ipalib/x509.py\", line 45, in <module>\n from pyasn1_modules import rfc2315, rfc2459\n Fi$
e \"/usr/lib/python2.7/site-packages/pyasn1_modules/rfc2315.py\", line 67, in <module>\n class DigestedData(univ.Sequence):\n File \"/usr/lib/python2.7/site-pa$
kages/pyasn1_modules/rfc2315.py\", line 72, in DigestedData\n namedtype.NamedType('digest', Digest)\n File \"/usr/lib/python2.7/site-packages/pyasn1/type/named$
ype.py\", line 159, in __init__\n self.__ambiguousTypes = 'terminal' not in kwargs and self
1 files added
4 files modified
78 ■■■■■ changed files
ansible/configs/ocp4-coreos-deployer/env_vars.yml 3 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp4-shared/env_vars.yml 5 ●●●● patch | view | raw | blame | history
ansible/configs/ocp4-workshop/env_vars.yml 5 ●●●● patch | view | raw | blame | history
ansible/roles/bastion/tasks/k8s.yml 34 ●●●●● patch | view | raw | blame | history
ansible/roles/bastion/tasks/main.yml 31 ●●●●● patch | view | raw | blame | history
ansible/configs/ocp4-coreos-deployer/env_vars.yml
@@ -26,6 +26,9 @@
install_ipa_client: false
install_student_user: false
# install openshift python modules on bastion
install_k8s_modules: true
## Automatically deploy ocp4 cluster using the installer
install_ocp4: false
ocp4_installer_version: "v0.16.1"
ansible/configs/ocp4-shared/env_vars.yml
@@ -26,8 +26,11 @@
install_ipa_client: false
install_student_user: false
# install openshift modules on bastion
install_k8s_modules: true
## Automatically deploy ocp4 cluster using the installer
install_ocp4: false
install_ocp4: true
ocp4_installer_version: "v0.16.1"
oc_client_version: "4.0.22"
cluster_name: "cluster-{{ guid }}"
ansible/configs/ocp4-workshop/env_vars.yml
@@ -26,8 +26,11 @@
install_ipa_client: false
install_student_user: false
# install openshift python modules on bastion
install_k8s_modules: true
## Automatically deploy ocp4 cluster using the installer
install_ocp4: false
install_ocp4: true
ocp4_installer_version: "v0.16.1"
oc_client_version: "4.0.22"
cluster_name: "cluster-{{ guid }}"
ansible/roles/bastion/tasks/k8s.yml
New file
@@ -0,0 +1,34 @@
---
- tags:
    - bastion_k8s
  block:
    - name: Download pip installer
      get_url:
        url: https://bootstrap.pypa.io/get-pip.py
        dest: /tmp/get-pip.py
        mode: 0440
    - name: Run pip installer
      command: python /tmp/get-pip.py
    - name: Remove pip installer
      file:
        path: /tmp/get-pip.py
        state: absent
    - name: Install pip packages
      pip:
        name:
          - virtualenv
    - name: Upgrade pip packages
      pip:
        name:
          - setuptools
        extra_args: --upgrade
    - name: Install OpenShift pip package
      pip:
        name:
          - openshift
        extra_args: --ignore-installed
ansible/roles/bastion/tasks/main.yml
@@ -100,35 +100,8 @@
      when: ensuresshpresent.rc == 0
- name: Install Python pip/openshift/virtualenv for k8s module use on bastion
  tags:
  - bastion_k8s
  block:
  - name: Download pip installer
    get_url:
      url: https://bootstrap.pypa.io/get-pip.py
      dest: /tmp/get-pip.py
      mode: 0440
  - name: Run pip installer
    command: python /tmp/get-pip.py
  - name: Remove pip installer
    file:
      path: /tmp/get-pip.py
      state: absent
  - name: Install pip packages
    pip:
      name:
      - virtualenv
  - name: Upgrade pip packages
    pip:
      name:
      - setuptools
      extra_args: --upgrade
  - name: Install OpenShift pip package
    pip:
      name:
      - openshift
      extra_args: --ignore-installed
  include_tasks: k8s.yml
  when: install_k8s_modules | default(false)
- name: Install jq on the bastion
  get_url: