Advertisement
Guest User

kubetools_install.yaml

a guest
Nov 12th, 2019
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.81 KB | None | 0 0
  1. - hosts: all
  2.   gather_facts: true
  3.  
  4.   tasks:
  5.   - name: Add an apt signing key for Kubernetes
  6.     apt_key:
  7.       url: https://packages.cloud.google.com/apt/doc/apt-key.gpg
  8.       state: present
  9.  
  10.   - name: Adding apt repository for Kubernetes
  11.     apt_repository:
  12.       repo: deb https://apt.kubernetes.io/ kubernetes-xenial main
  13.       state: present
  14.       filename: kubernetes.list
  15.  
  16.   - name: Install Kubernetes binaries
  17.     apt:
  18.       name: "{{ packages }}"
  19.       state: present
  20.       update_cache: yes
  21.     vars:
  22.       packages:
  23.      - kubelet
  24.       - kubeadm
  25.  
  26. - hosts: master
  27.   gather_facts: true
  28.  
  29.   tasks:
  30.   - name: Install Kubernetes kubectl for master node
  31.     apt:
  32.       name: "{{ packages }}"
  33.       state: present
  34.       update_cache: yes
  35.     vars:
  36.       packages:
  37.      - kubectl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement