qinling/tools/gate/kubeadm/playbook/deploy_k8s.yaml

25 lines
532 B
YAML

---
- name: Deploy k8s cluster
hosts: localhost
become: true
become_method: sudo
gather_facts: false
pre_tasks:
- name: install python 2
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal)
- name: Gather facts after python installation
setup: filter=ansible_*
- name: Install packages
apt: name={{ item }} state=present update_cache=yes
with_items:
- ansible
- unzip
- httpie
roles:
- docker
- k8s_cli
- kube_master