Add travis tests

This commit is contained in:
ant31
2015-12-22 11:50:55 +01:00
parent 8fa0110e28
commit 9a03249446
4 changed files with 71 additions and 9 deletions

View File

@@ -1,20 +1,23 @@
---
- name: Write kubelet systemd init file
- debug: msg="{{init_system == "systemd"}}"
- debug: msg="{{init_system}}"
- name: install | Write kubelet systemd init file
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service backup=yes
when: init_system == "systemd"
notify: restart systemd-kubelet
- name: Write kubelet initd script
- name: install | Write kubelet initd script
template: src=deb-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes
when: init_system == "sysvinit" and ansible_os_family == "Debian"
notify: restart kubelet
- name: Write kubelet initd script
- name: install | Write kubelet initd script
template: src=rh-kubelet.initd.j2 dest=/etc/init.d/kubelet owner=root mode=755 backup=yes
when: init_system == "sysvinit" and ansible_os_family == "RedHat"
notify: restart kubelet
- name: Install kubelet binary
- name: install | Install kubelet binary
synchronize:
src: "{{ local_release_dir }}/kubernetes/bin/kubelet"
dest: "{{ bin_dir }}/kubelet"
@@ -25,14 +28,14 @@
notify:
- restart kubelet
- name: Perms kubelet binary
- name: install | Perms kubelet binary
file: path={{ bin_dir }}/kubelet owner=kube mode=0755 state=file
- name: Calico-plugin | Directory
- name: install | Calico-plugin | Directory
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/ state=directory
when: kube_network_plugin == "calico"
- name: Calico-plugin | Binary
- name: install | Calico-plugin | Binary
synchronize:
src: "{{ local_release_dir }}/calico/bin/calico"
dest: "/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico"
@@ -43,5 +46,5 @@
when: kube_network_plugin == "calico"
notify: restart kubelet
- name: Perms calico plugin binary
- name: install | Perms calico plugin binary
file: path=/usr/libexec/kubernetes/kubelet-plugins/net/exec/calico/calico owner=kube mode=0755 state=file

View File

@@ -1,7 +1,8 @@
---
- name: "Identify init system"
shell: >
if $(pgrep systemd > /dev/null); then
$(pgrep systemd > /dev/null && systemctl status > /dev/null);
if [ $? -eq 0 ] ; then
echo systemd;
else
echo sysvinit;