From 28954e634ce90d08f419fb9a9f780bd36f519a46 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 2 Jan 2018 19:38:12 +0100 Subject: [PATCH] whitespaces --- apache/tasks/auth.yml | 14 ++--- apache/tasks/log2mail.yml | 4 ++ apache/tasks/main.yml | 70 +++++++++++++---------- nginx/tasks/logrotate.yml | 4 ++ nginx/tasks/main_regular.yml | 36 ++++++------ nginx/tasks/packages_jessie.yml | 4 +- nginx/tasks/packages_jessie_backports.yml | 12 ++-- 7 files changed, 81 insertions(+), 63 deletions(-) diff --git a/apache/tasks/auth.yml b/apache/tasks/auth.yml index dff100ce..03598682 100644 --- a/apache/tasks/auth.yml +++ b/apache/tasks/auth.yml @@ -9,7 +9,7 @@ mode: "0640" force: no tags: - - apache + - apache - name: add IP addresses to private IP whitelist lineinfile: @@ -19,7 +19,7 @@ with_items: "{{ apache_ipaddr_whitelist_present }}" notify: reload apache tags: - - apache + - apache - name: remove IP addresses from private IP whitelist lineinfile: @@ -29,7 +29,7 @@ with_items: "{{ apache_ipaddr_whitelist_absent }}" notify: reload apache tags: - - apache + - apache - name: include private IP whitelist for server-status lineinfile: @@ -38,7 +38,7 @@ insertafter: 'SetHandler server-status' state: present tags: - - apache + - apache - name: Copy private_htpasswd copy: @@ -50,7 +50,7 @@ force: no notify: reload apache tags: - - apache + - apache - name: add user:pwd to private htpasswd lineinfile: @@ -60,7 +60,7 @@ with_items: "{{ apache_private_htpasswd_present }}" notify: reload apache tags: - - apache + - apache - name: remove user:pwd from private htpasswd lineinfile: @@ -70,4 +70,4 @@ with_items: "{{ apache_private_htpasswd_absent }}" notify: reload apache tags: - - apache + - apache diff --git a/apache/tasks/log2mail.yml b/apache/tasks/log2mail.yml index 894ff039..3b0650b7 100644 --- a/apache/tasks/log2mail.yml +++ b/apache/tasks/log2mail.yml @@ -4,6 +4,8 @@ apt: name: log2mail state: present + tags: + - apache - name: Add log2mail config for Apache segfaults template: @@ -13,3 +15,5 @@ group: adm mode: "0644" force: no + tags: + - apache diff --git a/apache/tasks/main.yml b/apache/tasks/main.yml index 3820fad2..ab45b7ea 100644 --- a/apache/tasks/main.yml +++ b/apache/tasks/main.yml @@ -5,14 +5,14 @@ name: '{{ item }}' state: present with_items: - - apache2 - - libapache2-mpm-itk - - libapache2-mod-evasive - - apachetop - - libwww-perl + - apache2 + - libapache2-mpm-itk + - libapache2-mod-evasive + - apachetop + - libwww-perl tags: - - apache - - packages + - apache + - packages when: ansible_distribution_major_version | version_compare('9', '>=') - name: packages are installed (jessie) @@ -20,13 +20,13 @@ name: '{{ item }}' state: present with_items: - - apache2-mpm-itk - - libapache2-mod-evasive - - apachetop - - libwww-perl + - apache2-mpm-itk + - libapache2-mod-evasive + - apachetop + - libwww-perl tags: - - apache - - packages + - apache + - packages when: ansible_distribution_release == "jessie" - name: basic modules are enabled @@ -34,17 +34,17 @@ name: '{{ item }}' state: present with_items: - - rewrite - - expires - - headers - - cgi - - ssl - - include - - negotiation - - alias + - rewrite + - expires + - headers + - cgi + - ssl + - include + - negotiation + - alias notify: reload apache tags: - - apache + - apache - name: Copy Apache defaults config file copy: @@ -75,19 +75,23 @@ dest: /etc/apache2/mods-enabled/status.conf state: absent notify: reload apache + tags: + - apache - name: Ensure Apache config files are enabled command: "a2enconf {{ item }}" register: command_result changed_when: "'Enabling' in command_result.stderr" with_items: - - z-evolinux-defaults.conf - - zzz-evolinux-custom.conf + - z-evolinux-defaults.conf + - zzz-evolinux-custom.conf notify: reload apache tags: - - apache + - apache - include: auth.yml + tags: + - apache - name: default vhost is installed template: @@ -97,7 +101,7 @@ force: no notify: reload apache tags: - - apache + - apache - name: default vhost is enabled file: @@ -108,7 +112,7 @@ notify: reload apache when: apache_evolinux_default_enabled tags: - - apache + - apache - name: is umask already present? command: "grep -E '^umask ' /etc/apache2/envvars" @@ -117,7 +121,7 @@ register: envvar_grep_umask check_mode: no tags: - - apache + - apache - name: Add a mark in envvars for umask blockinfile: @@ -129,12 +133,12 @@ umask 007 when: envvar_grep_umask.rc != 0 tags: - - apache + - apache - include_role: name: remount-usr tags: - - apache + - apache - name: "Install save_apache_status.sh" copy: @@ -142,9 +146,15 @@ dest: /usr/share/scripts/save_apache_status.sh mode: "0755" force: no + tags: + - apache - include: log2mail.yml when: apache_log2mail_include + tags: + - apache - include: munin.yml when: apache_munin_include + tags: + - apache diff --git a/nginx/tasks/logrotate.yml b/nginx/tasks/logrotate.yml index 29e38978..6cdd556c 100644 --- a/nginx/tasks/logrotate.yml +++ b/nginx/tasks/logrotate.yml @@ -1,6 +1,10 @@ --- + - name: logrotate configuration copy: src: logrotate_nginx dest: /etc/logrotate.d/nginx force: no + tags: + - nginx + - logrotate diff --git a/nginx/tasks/main_regular.yml b/nginx/tasks/main_regular.yml index f6563b76..0d3b4b7a 100644 --- a/nginx/tasks/main_regular.yml +++ b/nginx/tasks/main_regular.yml @@ -16,7 +16,7 @@ line: ' worker_connections 1024;' insertafter: 'events \{' tags: - - nginx + - nginx - name: use epoll lineinfile: @@ -25,7 +25,7 @@ line: ' use epoll;' insertafter: 'events \{' tags: - - nginx + - nginx - name: Install Nginx http configuration copy: @@ -35,7 +35,7 @@ # force: yes notify: reload nginx tags: - - nginx + - nginx # TODO: verify that those permissions are correct : # not too strict for ipaddr_whitelist @@ -52,7 +52,7 @@ force: no notify: reload nginx tags: - - nginx + - nginx - name: add IP addresses to private IP whitelist lineinfile: @@ -62,7 +62,7 @@ with_items: "{{ nginx_ipaddr_whitelist_present }}" notify: reload nginx tags: - - nginx + - nginx - name: remove IP addresses from private IP whitelist lineinfile: @@ -72,7 +72,7 @@ with_items: "{{ nginx_ipaddr_whitelist_absent }}" notify: reload nginx tags: - - nginx + - nginx - name: Copy private_htpasswd copy: @@ -85,7 +85,7 @@ force: no notify: reload nginx tags: - - nginx + - nginx - name: add user:pwd to private htpasswd lineinfile: @@ -95,7 +95,7 @@ with_items: "{{ nginx_private_htpasswd_present }}" notify: reload nginx tags: - - nginx + - nginx - name: remove user:pwd from private htpasswd lineinfile: @@ -105,7 +105,7 @@ with_items: "{{ nginx_private_htpasswd_absent }}" notify: reload nginx tags: - - nginx + - nginx - name: nginx vhost is installed template: @@ -115,7 +115,7 @@ force: no notify: reload nginx tags: - - nginx + - nginx - name: default vhost is enabled file: @@ -126,7 +126,7 @@ notify: reload nginx when: nginx_evolinux_default_enabled tags: - - nginx + - nginx # - block: # - name: generate random string for phpmyadmin suffix @@ -168,7 +168,7 @@ enabled: yes state: started tags: - - nginx + - nginx - name: Check if Munin is installed stat: @@ -176,19 +176,19 @@ check_mode: no register: stat_munin_node tags: - - nginx - - munin + - nginx + - munin - include: munin_vhost.yml when: stat_munin_node.stat.exists tags: - - nginx - - munin + - nginx + - munin - include: munin_graphs.yml when: stat_munin_node.stat.exists tags: - - nginx - - munin + - nginx + - munin - include: logrotate.yml diff --git a/nginx/tasks/packages_jessie.yml b/nginx/tasks/packages_jessie.yml index ce806ba2..356b0b5e 100644 --- a/nginx/tasks/packages_jessie.yml +++ b/nginx/tasks/packages_jessie.yml @@ -7,5 +7,5 @@ state: present notify: restart nginx tags: - - nginx - - packages + - nginx + - packages diff --git a/nginx/tasks/packages_jessie_backports.yml b/nginx/tasks/packages_jessie_backports.yml index b9c1eaf9..91a6643b 100644 --- a/nginx/tasks/packages_jessie_backports.yml +++ b/nginx/tasks/packages_jessie_backports.yml @@ -4,8 +4,8 @@ name: apt tasks_from: backports.yml tags: - - nginx - - packages + - nginx + - packages - name: Prefer Nginx packages from jessie-backports copy: @@ -15,13 +15,13 @@ mode: "0640" register: nginx_apt_preferences tags: - - nginx - - packages + - nginx + - packages - name: update apt apt: update_cache: yes when: nginx_apt_preferences | changed tags: - - nginx - - packages + - nginx + - packages