Skip to content

Instantly share code, notes, and snippets.

@lulichn
Last active December 25, 2015 07:38
Show Gist options
  • Save lulichn/6050673148871e87df5b to your computer and use it in GitHub Desktop.
Save lulichn/6050673148871e87df5b to your computer and use it in GitHub Desktop.
- hosts: 127.0.0.1
connection: local
sudo: yes
vars:
etcd_version: v2.2.2
kubernetes_version: v1.1.3
src: /tmp
tasks:
#- name: Yum install Docker
# yum: name=docker state=installed
#- yum: name=go state=installed
- name: Download etcd
get_url: url=https://github.com/coreos/etcd/releases/download/{{etcd_version}}/etcd-{{etcd_version}}-linux-amd64.tar.gz dest={{src}}
- name: Extract
command: tar xfz etcd-{{etcd_version}}-linux-amd64.tar.gz chdir={{src}} -C /usr/local/
- file: src=/usr/local/etcd-{{etcd_version}}-linux-amd64/etcd dest=/usr/bin/etcd state=link
- file: src=/usr/local/etcd-{{etcd_version}}-linux-amd64/etcdctl dest=/usr/bin/etcdctl state=link
- name: Download kubernetes
get_url: url=https://github.com/kubernetes/kubernetes/releases/download/{{kubernetes_version}}/kubernetes.tar.gz dest={{src}}
- name: Extract
command: tar xfz kubernetes.tar.gz chdir={{src}} -C /usr/local/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment