12345678910111213141516171819202122232425 |
- ---
- # 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
|