summaryrefslogtreecommitdiffstats
path: root/roles/kubernetes_kubelet/tasks
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2014-09-16 13:15:48 -0400
committerKenny Woodson <kwoodson@redhat.com>2014-09-16 13:15:48 -0400
commit5994dee9a8b3b1ee97f9e3b3529fd32ffb896187 (patch)
tree4c17abdd1e5b39e845d33d7d970ac216a82d766d /roles/kubernetes_kubelet/tasks
downloadopenshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.gz
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.bz2
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.tar.xz
openshift-5994dee9a8b3b1ee97f9e3b3529fd32ffb896187.zip
Initial Commit. Sharing is caring
Diffstat (limited to 'roles/kubernetes_kubelet/tasks')
-rw-r--r--roles/kubernetes_kubelet/tasks/main.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/roles/kubernetes_kubelet/tasks/main.yml b/roles/kubernetes_kubelet/tasks/main.yml
new file mode 100644
index 000000000..48eab7f84
--- /dev/null
+++ b/roles/kubernetes_kubelet/tasks/main.yml
@@ -0,0 +1,31 @@
+---
+# tasks file for kubernetes_kubelet
+- name: Install kubernetes
+ yum: pkg=kubernetes state=installed
+
+- name: Configure kubelet
+ lineinfile: >
+ dest=/etc/sysconfig/kubernetes
+ regexp={{ item.regex }}
+ line="{{ item.line }}"
+ with_items:
+ - { regex: '^KUBE_ETCD_SERVERS=', line: 'KUBE_ETCD_SERVERS=\"http://{{ oo_master_ips[0] }}:4001\"' }
+ - { regex: '^KUBE_KUBELET_ADDRESS=', line: 'KUBE_KUBELET_ADDRESS=\"0.0.0.0\"' }
+ - { regex: '^KUBE_KUBELET_HOSTNAME_OVERRIDE=', line: 'KUBE_KUBELET_HOSTNAME_OVERRIDE=\"{{ hostvars[inventory_hostname].ansible_eth0.ipv4.address }}\"' }
+ notify:
+ - restart kubelet
+
+
+#- name: write the cadvisor config
+# template: src=cadvisor.manifest dest=/etc/kubernetes/manifests/cadvisor.manifest
+# notify:
+# - restart kubelet
+
+- name: Enable kubelet
+ service: name=kubernetes-kubelet enabled=yes state=started
+
+- name: Open firewalld port for the kubelet
+ firewalld: port=10250/tcp permanent=false state=enabled
+
+- name: Save firewalld port for the kubelet
+ firewalld: port=10250/tcp permanent=true state=enabled