From 5281d41445acf9af0956774ec70183584d81f590 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Tue, 3 Oct 2017 15:02:38 +0300 Subject: [PATCH] Add names to include tasks Raised by ansible-lint in the following rule: [ANSIBLE0011] All tasks should be named --- roles/common/tasks/main.yml | 15 ++++++++++----- roles/munin/tasks/main.yml | 6 ++++-- roles/nginx/tasks/main.yml | 3 ++- roles/php-fpm/tasks/main.yml | 6 ++++-- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/roles/common/tasks/main.yml b/roles/common/tasks/main.yml index 1963ae4..ca182bf 100644 --- a/roles/common/tasks/main.yml +++ b/roles/common/tasks/main.yml @@ -1,15 +1,19 @@ --- -- import_tasks: ntp.yml +- name: Configure network time + import_tasks: ntp.yml tags: ntp -- include_tasks: packages_{{ ansible_distribution }}.yml +- name: Install common packages + include_tasks: packages_{{ ansible_distribution }}.yml tags: packages -- include_tasks: firewall_{{ ansible_distribution }}.yml +- name: Configure firewall + include_tasks: firewall_{{ ansible_distribution }}.yml tags: firewall -- import_tasks: sshd.yml +- name: Configure secure shell daemon + import_tasks: sshd.yml tags: sshd # containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts! @@ -28,7 +32,8 @@ template: src=etc/udev/rules.d/60-scheduler.rules.j2 dest=/etc/udev/rules.d/60-scheduler.rules owner=root group=root mode=0644 tags: udev -- import_tasks: ssh-keys.yml +- name: Copy admin SSH keys + import_tasks: ssh-keys.yml tags: ssh-keys # vim: set sw=2 ts=2: diff --git a/roles/munin/tasks/main.yml b/roles/munin/tasks/main.yml index b6009b1..a45dd07 100644 --- a/roles/munin/tasks/main.yml +++ b/roles/munin/tasks/main.yml @@ -1,6 +1,8 @@ --- -- import_tasks: munin.yml +- name: Configure munin scraper + import_tasks: munin.yml tags: munin -- import_tasks: munin-node.yml +- name: Configure munin listener + import_tasks: munin-node.yml tags: munin-node diff --git a/roles/nginx/tasks/main.yml b/roles/nginx/tasks/main.yml index ab31a0d..78895b9 100644 --- a/roles/nginx/tasks/main.yml +++ b/roles/nginx/tasks/main.yml @@ -34,7 +34,8 @@ file: path=/var/cache/nginx/cached/fastcgi state=directory owner=nginx group=nginx mode=0755 tags: nginx -- import_tasks: vhosts.yml +- name: Configure nginx virtual hosts + import_tasks: vhosts.yml when: nginx_vhosts is defined tags: nginx diff --git a/roles/php-fpm/tasks/main.yml b/roles/php-fpm/tasks/main.yml index 97e8d49..b177dfe 100644 --- a/roles/php-fpm/tasks/main.yml +++ b/roles/php-fpm/tasks/main.yml @@ -2,11 +2,13 @@ # Note: Debian 9's php-fpm config is identical to Ubuntu 16.04's, so for now we # can capitalize on that and use the same tasks. -- import_tasks: Debian.yml +- name: Configure php-fpm on old Debian + import_tasks: Debian.yml when: ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '<') tags: php-fpm -- import_tasks: Ubuntu.yml +- name: Configure php-fpm on Ubuntu and Debian 9 + import_tasks: Ubuntu.yml when: ansible_distribution == 'Ubuntu' or (ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '==')) tags: php-fpm