diff --git a/all/common/tasks/main.yml b/all/common/tasks/main.yml
index e54621b26b7e8b35da9c10ddb9e6e7a65d08ba28..a80e5c1937e75b68a4030893a00f111b71e98505 100644
--- a/all/common/tasks/main.yml
+++ b/all/common/tasks/main.yml
@@ -4,44 +4,43 @@
 - name: create motd file
   template: src=motd.j2 dest=/etc/motd
 
-- name: install apt-transport-https packages before adding sources 
+- name: install apt-transport-https packages before adding sources
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - apt-transport-https
 
-- name: add debian repo keys 
+- name: add debian repo keys
   apt_key:
     url: "{{ item }}"
     state: present
   with_items: "{{ debian_keys }}"
   when: debian_keys
 
-- name: set debian repos 
-  template: src=sources.list.j2 dest=/etc/apt/sources.list   
+- name: set debian repos
+  template: src=sources.list.j2 dest=/etc/apt/sources.list
 
 - name: install common packages
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - vim
     - wget
     - psmisc
     - tree
 
-- name: deploy sshd config  
-  template: src=sshd_config.j2 dest=/etc/ssh/sshd_config 
-  notify: restart sshd 
-  
+- name: deploy sshd config
+  template: src=sshd_config.j2 dest=/etc/ssh/sshd_config
+  notify: restart sshd
+
 - name: add sshkeys for server
-  authorized_key: 
-    user: root 
+  authorized_key:
+    user: root
     key: "{{ lookup('file', '../keyfiles/' + item + '.pub') }}"
   with_items: "{{ administratorenteam }}"
   when: administratorenteam
-  notify: restart sshd 
-
+  notify: restart sshd
diff --git a/common/borgbackup/tasks/main.yml b/common/borgbackup/tasks/main.yml
index 4f57ddaf2961c1dd9db6707b8b28433ef729b58f..48cbf113856d8d4a0543ad0193ae42cf8862bc9b 100644
--- a/common/borgbackup/tasks/main.yml
+++ b/common/borgbackup/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - borgbackup
     - logrotate
diff --git a/common/borgserver/tasks/main.yml b/common/borgserver/tasks/main.yml
index 5d1264d3d1b3ffef603e9aceea19198070329c32..be7ada439516395bc80f1f44cee0314e2dbe8c59 100644
--- a/common/borgserver/tasks/main.yml
+++ b/common/borgserver/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - borgbackup
 
diff --git a/common/docker/tasks/main.yml b/common/docker/tasks/main.yml
index 0eec4ee06feac6885312d556507ed2041953d83b..797d8e3d6115cdf5b4c26a2765b9f82a6f732f52 100644
--- a/common/docker/tasks/main.yml
+++ b/common/docker/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - docker-ce
     - python 
diff --git a/common/telegraf/tasks/main.yml b/common/telegraf/tasks/main.yml
index 6f8c0fc217022136ab6efaf30b2822a31bd5c590..a20dbc13b80c4ca84ced809b2defe1eb2c656271 100644
--- a/common/telegraf/tasks/main.yml
+++ b/common/telegraf/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - telegraf
 
@@ -12,7 +12,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - hddtemp
     - lm-sensors
diff --git a/functions/get_secret.yml b/functions/get_secret.yml
index eadd5693fb16ad44aebf3b28ed025cee0a26d97f..e8b5964e8a911b814182911342400c8e888f5262 100644
--- a/functions/get_secret.yml
+++ b/functions/get_secret.yml
@@ -30,7 +30,7 @@
   apt:
     pkg: openssl
     update_cache: no
-    state: installed
+    state: present
   when: filestat.stat.exists == False 
 
 - name: "{{ item.path | basename }} (generate: length = {{ item.length }})"
diff --git a/vorstandspi/git/tasks/main.yml b/vorstandspi/git/tasks/main.yml
index 9d82c8fefee00b03c8b1386f12df37fab9eade93..74b1d5a6fbd3ce0b89d90b0bb282375825a56887 100644
--- a/vorstandspi/git/tasks/main.yml
+++ b/vorstandspi/git/tasks/main.yml
@@ -5,7 +5,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - git
 
diff --git a/vorstandspi/jameica/tasks/main.yml b/vorstandspi/jameica/tasks/main.yml
index 3e48e5f931d5a9972cadcfe1349945171d7f7f8c..63af55d46b061223c95c73f4ec332be98cba4a84 100644
--- a/vorstandspi/jameica/tasks/main.yml
+++ b/vorstandspi/jameica/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - openjdk-8-jre
     - libswt-gtk-3-java
diff --git a/vorstandspi/mysql/tasks/main.yml b/vorstandspi/mysql/tasks/main.yml
index 00dbef3219c049d17fefa83abf3a84a6b2bef1a9..3dbd4e2743cd03fbbc35be2139ba65ea4ec9837e 100644
--- a/vorstandspi/mysql/tasks/main.yml
+++ b/vorstandspi/mysql/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - mariadb-server
     - mariadb-client
diff --git a/warphab/homegear/tasks/main.yml b/warphab/homegear/tasks/main.yml
index a7bb25beb2b52602fb6e967efda97a2a60d63583..06f521920ad9ebac09210e9ad9c0e009fc1120f7 100644
--- a/warphab/homegear/tasks/main.yml
+++ b/warphab/homegear/tasks/main.yml
@@ -5,7 +5,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - homegear 
     - homegear-max
diff --git a/warphab/openhab/tasks/main.yml b/warphab/openhab/tasks/main.yml
index aec33f222e804512b06e8d934329c4454e2254f4..dc7e0ad69635129186edca7579f78cfe656ccb33 100644
--- a/warphab/openhab/tasks/main.yml
+++ b/warphab/openhab/tasks/main.yml
@@ -4,7 +4,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - oracle-java8-jdk
     - openhab2-offline 
diff --git a/warpsrvint/docker/tasks/main.yml b/warpsrvint/docker/tasks/main.yml
index 0f634a64837ee0f5b507b0faf0f29e48c87c9f98..bce3370d90d91032c1abe4346616ad6e6b7551b3 100644
--- a/warpsrvint/docker/tasks/main.yml
+++ b/warpsrvint/docker/tasks/main.yml
@@ -9,7 +9,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - docker-engine
     - python 
diff --git a/warpsrvint/nginx/tasks/main.yml b/warpsrvint/nginx/tasks/main.yml
index c912546d98d9747b700e561b8ba3bfb88656e407..33e39386084a2148fe210d87b7e21ec05ced3eee 100644
--- a/warpsrvint/nginx/tasks/main.yml
+++ b/warpsrvint/nginx/tasks/main.yml
@@ -3,7 +3,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - nginx
     - git
diff --git a/webserver/docker/tasks/main.yml b/webserver/docker/tasks/main.yml
index 650f0aa4ad245b066199d54f961f95b3ead26cb7..9d1835cd753c68caa6a2eda21f9219bd2fd4a183 100644
--- a/webserver/docker/tasks/main.yml
+++ b/webserver/docker/tasks/main.yml
@@ -9,7 +9,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - docker-ce
     - python 
diff --git a/webserver/nginx/tasks/main.yml b/webserver/nginx/tasks/main.yml
index 3cdd02f515c71e88c85f35388f849426b8ba5311..35a2d6b265b675b1d80914d32b12ea4d9b7ab36c 100644
--- a/webserver/nginx/tasks/main.yml
+++ b/webserver/nginx/tasks/main.yml
@@ -3,7 +3,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - nginx
     - git
diff --git a/webserver/openvpn/tasks/main.yml b/webserver/openvpn/tasks/main.yml
index 63f6b928dc842e8ba6ddc7ba6b2494cdfdfd0a86..153f2794e735559c9651b74b455f82ad771a9eb2 100644
--- a/webserver/openvpn/tasks/main.yml
+++ b/webserver/openvpn/tasks/main.yml
@@ -3,7 +3,7 @@
   apt:
     pkg: "{{ item }}"
     update_cache: yes
-    state: installed
+    state: present
   with_items:
     - openvpn