From 7e856c2923c2c3b85f865ca7bd6835632e872546 Mon Sep 17 00:00:00 2001 From: Markus Hauschild Date: Sun, 2 Jul 2017 22:17:32 +0200 Subject: [PATCH] Cleanup (mostly apt: state=present). --- roles/common/tasks/Debian.yml | 4 ++-- roles/common/tasks/FreeBSD.yml | 4 ++-- roles/dss/tasks/main.yml | 4 ++-- roles/gogs/tasks/main.yml | 4 ++-- roles/ldap-pam/tasks/main.yml | 2 +- roles/librenms/tasks/main.yml | 2 +- roles/mail/tasks/main.yml | 2 +- roles/member-sw/tasks/main.yml | 2 +- roles/ntp/tasks/Debian.yml | 2 +- roles/owncloud/tasks/main.yml | 2 +- roles/prosody/tasks/main.yml | 2 +- roles/racktables/tasks/main.yml | 2 +- roles/slapd/tasks/main.yml | 16 ++-------------- roles/web/tasks/main.yml | 2 +- 14 files changed, 19 insertions(+), 31 deletions(-) diff --git a/roles/common/tasks/Debian.yml b/roles/common/tasks/Debian.yml index dd87a09..e04529e 100644 --- a/roles/common/tasks/Debian.yml +++ b/roles/common/tasks/Debian.yml @@ -1,7 +1,7 @@ --- - name: Install snmpd - apt: name=snmpd state=present + apt: name=snmpd tags: snmp - name: Make snmpd less verbose @@ -19,7 +19,7 @@ tags: snmp - name: Install misc software - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - apt-dater-host - dnsutils diff --git a/roles/common/tasks/FreeBSD.yml b/roles/common/tasks/FreeBSD.yml index 0cbca69..9079bae 100644 --- a/roles/common/tasks/FreeBSD.yml +++ b/roles/common/tasks/FreeBSD.yml @@ -1,7 +1,7 @@ --- - name: Install snmpd - pkgng: name=net-snmp state=present + pkgng: name=net-snmp tags: snmp - name: Configure snmpd @@ -14,7 +14,7 @@ tags: snmp - name: Install misc software - pkgng: name={{ item }} state=present + pkgng: name={{ item }} with_items: - vim-lite - htop diff --git a/roles/dss/tasks/main.yml b/roles/dss/tasks/main.yml index d236c07..7adfc99 100644 --- a/roles/dss/tasks/main.yml +++ b/roles/dss/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install dependencies - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - python-flask - python-flaskext.wtf @@ -12,7 +12,7 @@ - uwsgi #- name: Install bk-dss -# git: repo=https://github.com/moepman/bk-diss.git dest=/var/www/dss depth=1 version=b1e0035e83dcf533610423a1cf4374e6c6dbf3d8 +# git: repo=https://github.com/moepman/bk-diss.git dest=/var/www/dss depth=1 version=ca364a7dd456b7f6060213102d136148784b6a47 # TODO Configure bk-dss diff --git a/roles/gogs/tasks/main.yml b/roles/gogs/tasks/main.yml index 63469cd..18ea547 100644 --- a/roles/gogs/tasks/main.yml +++ b/roles/gogs/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Enable https for apt - apt: name=apt-transport-https state=present + apt: name=apt-transport-https - name: Enable gogs apt-key apt_key: url='https://deb.packager.io/key' @@ -13,7 +13,7 @@ apt: name=gogs state=latest - name: Install PostgreSQL - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - postgresql - python-psycopg2 diff --git a/roles/ldap-pam/tasks/main.yml b/roles/ldap-pam/tasks/main.yml index 67d3513..ba30cfd 100644 --- a/roles/ldap-pam/tasks/main.yml +++ b/roles/ldap-pam/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install nslcd - apt: name=nslcd state=present + apt: name=nslcd tags: ldap - name: Configure nslcd diff --git a/roles/librenms/tasks/main.yml b/roles/librenms/tasks/main.yml index 087ad8a..07fe9c8 100644 --- a/roles/librenms/tasks/main.yml +++ b/roles/librenms/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install dependencies - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - fping - git diff --git a/roles/mail/tasks/main.yml b/roles/mail/tasks/main.yml index 87c6e90..3bb3929 100644 --- a/roles/mail/tasks/main.yml +++ b/roles/mail/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install packages - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - amavisd-new - bsd-mailx diff --git a/roles/member-sw/tasks/main.yml b/roles/member-sw/tasks/main.yml index de39939..ea50afd 100644 --- a/roles/member-sw/tasks/main.yml +++ b/roles/member-sw/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install software for members - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - apt-dater - git diff --git a/roles/ntp/tasks/Debian.yml b/roles/ntp/tasks/Debian.yml index b113021..6913b3d 100644 --- a/roles/ntp/tasks/Debian.yml +++ b/roles/ntp/tasks/Debian.yml @@ -1,7 +1,7 @@ --- - name: Install ntp - apt: name=ntp state=present + apt: name=ntp - name: Configure ntp template: src=ntp.conf.j2 dest=/etc/ntp.conf diff --git a/roles/owncloud/tasks/main.yml b/roles/owncloud/tasks/main.yml index 0102a74..34f63a3 100644 --- a/roles/owncloud/tasks/main.yml +++ b/roles/owncloud/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install packages - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - php7.0-apcu - php7.0-curl diff --git a/roles/prosody/tasks/main.yml b/roles/prosody/tasks/main.yml index 3e6da79..7c088d4 100644 --- a/roles/prosody/tasks/main.yml +++ b/roles/prosody/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install dependencies - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - prosody - lua-cyrussasl diff --git a/roles/racktables/tasks/main.yml b/roles/racktables/tasks/main.yml index 0954faf..1f523da 100644 --- a/roles/racktables/tasks/main.yml +++ b/roles/racktables/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install dependencies - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - mysql-server - php5-fpm diff --git a/roles/slapd/tasks/main.yml b/roles/slapd/tasks/main.yml index 28c51a0..72c9641 100644 --- a/roles/slapd/tasks/main.yml +++ b/roles/slapd/tasks/main.yml @@ -1,22 +1,15 @@ --- - name: Install slapd - apt: name={{ item }} state=present - with_items: - - slapd - tags: ldap + apt: name=slapd - name: Install slapd - apt: name={{ item }} state=present - with_items: - - slapd-smbk5pwd + apt: name=slapd-smbk5pwd when: slapd_role == "master" - tags: ldap - name: Remove slapd.d file: path=/etc/ldap/slapd.d state=absent notify: Restart slapd - tags: ldap - name: Copy schema definitons copy: src={{ item }} dest=/etc/ldap/{{ item }} @@ -25,23 +18,18 @@ - schema/samba.schema - schema/kitchen.schema notify: Restart slapd - tags: ldap - name: Configure slapd (init script) copy: src=slapd dest=/etc/default/slapd notify: Restart slapd - tags: ldap - name: Configure slapd template: src=slapd.conf.j2 dest=/etc/ldap/slapd.conf notify: Restart slapd - tags: ldap - name: Ensure certificates are available command: openssl req -x509 -nodes -newkey rsa:2048 -keyout /etc/ldap/ssl/srv.key -out /etc/ldap/ssl/srv.crt -days 730 -subj "/CN={{ slapd_hostname }}" creates=/etc/ldap/ssl/srv.crt notify: Restart slapd - tags: ldap - name: Start slapd service: name=slapd state=started enabled=yes - tags: ldap diff --git a/roles/web/tasks/main.yml b/roles/web/tasks/main.yml index b7be1b7..bb9474d 100644 --- a/roles/web/tasks/main.yml +++ b/roles/web/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: Install dependencies - apt: name={{ item }} state=present + apt: name={{ item }} with_items: - php5-fpm - php5-ldap