summaryrefslogtreecommitdiffstats
path: root/roles/kubernetes_apiserver/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_apiserver/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_apiserver/tasks')
-rw-r--r--roles/kubernetes_apiserver/tasks/main.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/kubernetes_apiserver/tasks/main.yml b/roles/kubernetes_apiserver/tasks/main.yml
new file mode 100644
index 000000000..622ecd5ca
--- /dev/null
+++ b/roles/kubernetes_apiserver/tasks/main.yml
@@ -0,0 +1,25 @@
+---
+# tasks file for kubernetes_apiserver
+- name: Install kubernetes
+ yum: pkg=kubernetes
+
+- name: Configure apiserver settings
+ lineinfile: >
+ dest=/etc/sysconfig/kubernetes
+ regexp={{ item.regex }}
+ line="{{ item.line }}"
+ with_items:
+ - { regex: '^KUBE_API_MACHINES=', line: 'KUBE_API_MACHINES=\"{{ oo_minion_ips | join(",") }}\"' }
+ - { regex: '^KUBE_API_ADDRESS=', line: 'KUBE_API_ADDRESS=\"0.0.0.0\"' }
+ notify:
+ - restart kubernetes-apiserver
+
+- name: Enable apiserver
+ service: name=kubernetes-apiserver enabled=yes state=started
+
+- name: Open firewalld port for apiserver
+ firewalld: port=8080/tcp permanent=false state=enabled
+
+- name: Save firewalld port for apiserver
+ firewalld: port=8080/tcp permanent=true state=enabled
+