From b773e17560d379082334b19135ec5aa78875a665 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 27 Jun 2019 16:16:19 +0200 Subject: [PATCH] whitespaces --- packweb-apache/tasks/apache.yml | 19 ++++--- packweb-apache/tasks/fhs_retrictions.yml | 67 ++++++++++++------------ packweb-apache/tasks/main.yml | 2 +- packweb-apache/tasks/phpmyadmin.yml | 4 +- webapps/evoadmin-web/tasks/packages.yml | 19 +++++-- 5 files changed, 59 insertions(+), 52 deletions(-) diff --git a/packweb-apache/tasks/apache.yml b/packweb-apache/tasks/apache.yml index 31570944..750875bb 100644 --- a/packweb-apache/tasks/apache.yml +++ b/packweb-apache/tasks/apache.yml @@ -21,19 +21,19 @@ name: '{{ item }}' state: present with_items: - - libapache2-mod-security2 - - modsecurity-crs - - apg + - libapache2-mod-security2 + - modsecurity-crs + - apg - name: Additional modules are enabled apache2_module: name: '{{ item }}' state: present with_items: - - ssl - - include - - negotiation - - alias + - ssl + - include + - negotiation + - alias - name: Copy Apache settings for modules copy: @@ -58,6 +58,5 @@ register: command_result changed_when: "'Enabling' in command_result.stderr" with_items: - - evolinux-evasive - - evolinux-modsec - + - evolinux-evasive + - evolinux-modsec diff --git a/packweb-apache/tasks/fhs_retrictions.yml b/packweb-apache/tasks/fhs_retrictions.yml index 2308db2a..09dd4b78 100644 --- a/packweb-apache/tasks/fhs_retrictions.yml +++ b/packweb-apache/tasks/fhs_retrictions.yml @@ -6,23 +6,23 @@ changed_when: "'changed' in command_result.stdout" failed_when: False with_items: - - / - - /etc - - /usr - - /usr/bin - - /var - - /var/log - - /home - - /bin - - /sbin - - /lib - - /usr/lib - - /usr/include - - /usr/bin - - /usr/sbin - - /usr/share - - /usr/share/doc - - /etc/default + - / + - /etc + - /usr + - /usr/bin + - /var + - /var/log + - /home + - /bin + - /sbin + - /lib + - /usr/lib + - /usr/include + - /usr/bin + - /usr/sbin + - /usr/share + - /usr/share/doc + - /etc/default - name: Set 750 permission on some folders (/var/log/apt, /var/log/munin, ...) shell: "test -d {{ item }} && chmod --verbose 750 {{ item }}" @@ -30,15 +30,15 @@ changed_when: "'changed' in command_result.stdout" failed_when: False with_items: - - /var/log/apt - - /var/lib/dpkg - - /var/log/munin - - /var/backups - - /etc/init.d - - /etc/apache2 - - /etc/network - - /etc/phpmyadmin - - /var/log/installer + - /var/log/apt + - /var/lib/dpkg + - /var/log/munin + - /var/backups + - /etc/init.d + - /etc/apache2 + - /etc/network + - /etc/phpmyadmin + - /var/log/installer - name: Change group to www-data for /etc/phpmyadmin/ file: @@ -51,11 +51,11 @@ changed_when: "'changed' in command_result.stdout" failed_when: False with_items: - - /bin/ping - - /bin/ping6 - - /usr/bin/fping - - /usr/bin/fping6 - - /usr/bin/mtr + - /bin/ping + - /bin/ping6 + - /usr/bin/fping + - /usr/bin/fping6 + - /usr/bin/mtr - name: Set 640 permission on some files (/var/log/evolix.log, ...) shell: "test -f {{ item }} && chmod --verbose 640 {{ item }}" @@ -63,6 +63,5 @@ changed_when: "'changed' in command_result.stdout" failed_when: False with_items: - - /var/log/evolix.log - - /etc/warnquota.conf - + - /var/log/evolix.log + - /etc/warnquota.conf diff --git a/packweb-apache/tasks/main.yml b/packweb-apache/tasks/main.yml index 71e479d6..64d60ded 100644 --- a/packweb-apache/tasks/main.yml +++ b/packweb-apache/tasks/main.yml @@ -65,7 +65,7 @@ - include: apache.yml -- include: phpmyadmin.yml +# - include: phpmyadmin.yml - include: awstats.yml diff --git a/packweb-apache/tasks/phpmyadmin.yml b/packweb-apache/tasks/phpmyadmin.yml index eac50843..5f56a162 100644 --- a/packweb-apache/tasks/phpmyadmin.yml +++ b/packweb-apache/tasks/phpmyadmin.yml @@ -5,8 +5,8 @@ name: '{{ item }}' state: present with_items: - - phpmyadmin - - apg + - phpmyadmin + - apg - name: Check if phpmyadmin default configuration is present stat: diff --git a/webapps/evoadmin-web/tasks/packages.yml b/webapps/evoadmin-web/tasks/packages.yml index 45d7e72e..4dcdd882 100644 --- a/webapps/evoadmin-web/tasks/packages.yml +++ b/webapps/evoadmin-web/tasks/packages.yml @@ -4,19 +4,28 @@ name: apt tasks_from: evolix_public.yml -- name: Install PHP packages +- name: Install PHP packages (Debian 10 and later) apt: name: '{{ item }}' state: present with_items: - - php-pear - - php-log + - php-pear + when: ansible_distribution_major_version | version_compare('10', '>=') -- name: Install PHP5 packages +- name: Install PHP packages (stretch) + apt: + name: '{{ item }}' + state: present + with_items: + - php-pear + - php-log + when: ansible_lsb.codename == "stretch" + +- name: Install PHP5 packages (jessie) apt: name: '{{ item }}' state: present allow_unauthenticated: yes with_items: - - php5-pam + - php5-pam when: ansible_lsb.codename == "jessie"