diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000000000000000000000000000000000..d289fb9b1d042c42311d4b85c8baae3291e46fdb
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,41 @@
+sudo: required
+dist: trusty
+language: python
+python: "2.7"
+
+addons:
+  hosts:
+    - node1
+
+env:
+  - SITE=cluster.yml
+
+before_install:
+  - sudo apt-get update -qq
+
+install:
+  # Install Ansible.
+  - sudo -H pip install ansible
+  - sudo -H pip install netaddr
+
+cache:
+  directories:
+    - $HOME/releases
+    - $HOME/.cache/pip
+
+before_script:
+  - export PATH=$PATH:/usr/local/bin
+
+script:
+  # Check the role/playbook's syntax.
+  - "sudo -H ansible-playbook -i inventory/local-tests.cfg $SITE --syntax-check"
+
+  # Run the role/playbook with ansible-playbook.
+  - "sudo -H ansible-playbook -i inventory/local-tests.cfg $SITE --connection=local"
+
+  # Run the role/playbook again, checking to make sure it's idempotent.
+  - >
+    sudo -H ansible-playbook -i inventory/local-tests.cfg $SITE --connection=local
+    | tee /dev/stderr | grep -q 'changed=0.*failed=0'
+    && (echo 'Idempotence test: pass' && exit 0)
+    || (echo 'Idempotence test: fail' && exit 1)
diff --git a/inventory/local-tests.cfg b/inventory/local-tests.cfg
new file mode 100644
index 0000000000000000000000000000000000000000..06fd3977b3f9d0e4c355c6ce0488a035d061882d
--- /dev/null
+++ b/inventory/local-tests.cfg
@@ -0,0 +1,17 @@
+node1 ansible_connection=local local_release_dir={{ansible_env.HOME}}/releases
+
+[downloader]
+node1
+
+[kube-master]
+node1
+
+[etcd]
+node1
+
+[kube-node]
+node1
+
+[k8s-cluster:children]
+kube-node
+kube-master
diff --git a/roles/kubernetes/node/tasks/install.yml b/roles/kubernetes/node/tasks/install.yml
index 87bef9d5dba83d4ed001f607065e81da0d174a8e..f98e672a494897d9ccad10beaf6bd5d054234c9f 100644
--- a/roles/kubernetes/node/tasks/install.yml
+++ b/roles/kubernetes/node/tasks/install.yml
@@ -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
diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml
index f7d02ff6b118354fa7caaf9e09c0afd687dca304..d4ff74d523af6bbca062a5c04e0abf03f47062a0 100644
--- a/roles/kubernetes/preinstall/tasks/main.yml
+++ b/roles/kubernetes/preinstall/tasks/main.yml
@@ -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;