From d954d5898abf8821d12515ac9c09e4b3aff28426 Mon Sep 17 00:00:00 2001 From: Jens Sandmann <jens@sandzwerg.de> Date: Tue, 10 Jul 2018 22:43:19 +0200 Subject: [PATCH] packe state changed to present from installed because installed is depricated --- all/common/tasks/main.yml | 27 +++++++++++++-------------- common/borgbackup/tasks/main.yml | 2 +- common/borgserver/tasks/main.yml | 2 +- common/docker/tasks/main.yml | 2 +- common/telegraf/tasks/main.yml | 4 ++-- functions/get_secret.yml | 2 +- vorstandspi/git/tasks/main.yml | 2 +- vorstandspi/jameica/tasks/main.yml | 2 +- vorstandspi/mysql/tasks/main.yml | 2 +- warphab/homegear/tasks/main.yml | 2 +- warphab/openhab/tasks/main.yml | 2 +- warpsrvint/docker/tasks/main.yml | 2 +- warpsrvint/nginx/tasks/main.yml | 2 +- webserver/docker/tasks/main.yml | 2 +- webserver/nginx/tasks/main.yml | 2 +- webserver/openvpn/tasks/main.yml | 2 +- 16 files changed, 29 insertions(+), 30 deletions(-) diff --git a/all/common/tasks/main.yml b/all/common/tasks/main.yml index e54621b2..a80e5c19 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 4f57ddaf..48cbf113 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 5d1264d3..be7ada43 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 0eec4ee0..797d8e3d 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 6f8c0fc2..a20dbc13 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 eadd5693..e8b5964e 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 9d82c8fe..74b1d5a6 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 3e48e5f9..63af55d4 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 00dbef32..3dbd4e27 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 a7bb25be..06f52192 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 aec33f22..dc7e0ad6 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 0f634a64..bce3370d 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 c912546d..33e39386 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 650f0aa4..9d1835cd 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 3cdd02f5..35a2d6b2 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 63f6b928..153f2794 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 -- GitLab