Commit 5cc5dfc2 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

KUBESPRAY setup from inventory vars

parent c7bab702
Loading
Loading
Loading
Loading

kubespray.yml

0 → 100644
+15 −0
Original line number Diff line number Diff line
---

- name: Setup Kubespray
  hosts: localhost
  connection: local
  become: no
  gather_facts: no
  tasks:
    - name: Clone kubespray repo ({{ kubespray_repo | default('https://github.com/southbridgeio/kubespray.git') }}) with required version ({{ kubespray_commit | default ('master') }})
      git:
        repo: "{{ kubespray_repo | default('https://github.com/southbridgeio/kubespray.git') }}"
        version: "{{ kubespray_commit | default ('master') }}"
        dest: kubespray
        clone: yes
        depth: 1
+4 −3
Original line number Diff line number Diff line
#!/usr/bin/env sh

test -n "${KUBESPRAY_REPO}" && echo "Use own kubespray repo: ${KUBESPRAY_REPO}"
git submodule add --name kubespray --depth 1 -- "${KUBESPRAY_REPO:-https://github.com/southbridgeio/kubespray.git}"
test -n "${KUBESPRAY_COMMIT}" && ( echo "Use kubespray repo commit: ${KUBESPRAY_COMMIT}" && cd kubespray && git checkout "${KUBESPRAY_COMMIT}" && cd .. ) || true
python3 -m venv --upgrade --system-site-packages .venv-setup
.venv-kubespray/bin/pip3 install --upgrade pip setuptools wheel
.venv-kubespray/bin/pip3 install ansible
.venv-kubespray/bin/ansible-playbook kubespray.yml

python3 -m venv --upgrade --system-site-packages .venv-kubespray
.venv-kubespray/bin/pip3 install --upgrade pip setuptools wheel