Add names to include tasks

Raised by ansible-lint in the following rule:

[ANSIBLE0011] All tasks should be named
This commit is contained in:
Alan Orth 2017-10-03 15:02:38 +03:00
parent 643c89891e
commit 5281d41445
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
4 changed files with 20 additions and 10 deletions

View File

@ -1,15 +1,19 @@
--- ---
- import_tasks: ntp.yml - name: Configure network time
import_tasks: ntp.yml
tags: ntp tags: ntp
- include_tasks: packages_{{ ansible_distribution }}.yml - name: Install common packages
include_tasks: packages_{{ ansible_distribution }}.yml
tags: packages tags: packages
- include_tasks: firewall_{{ ansible_distribution }}.yml - name: Configure firewall
include_tasks: firewall_{{ ansible_distribution }}.yml
tags: firewall tags: firewall
- import_tasks: sshd.yml - name: Configure secure shell daemon
import_tasks: sshd.yml
tags: sshd tags: sshd
# containers identify as virtualization hosts, which makes this tricky, because we have actual Debian VM hosts! # 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 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 tags: udev
- import_tasks: ssh-keys.yml - name: Copy admin SSH keys
import_tasks: ssh-keys.yml
tags: ssh-keys tags: ssh-keys
# vim: set sw=2 ts=2: # vim: set sw=2 ts=2:

View File

@ -1,6 +1,8 @@
--- ---
- import_tasks: munin.yml - name: Configure munin scraper
import_tasks: munin.yml
tags: munin tags: munin
- import_tasks: munin-node.yml - name: Configure munin listener
import_tasks: munin-node.yml
tags: munin-node tags: munin-node

View File

@ -34,7 +34,8 @@
file: path=/var/cache/nginx/cached/fastcgi state=directory owner=nginx group=nginx mode=0755 file: path=/var/cache/nginx/cached/fastcgi state=directory owner=nginx group=nginx mode=0755
tags: nginx tags: nginx
- import_tasks: vhosts.yml - name: Configure nginx virtual hosts
import_tasks: vhosts.yml
when: nginx_vhosts is defined when: nginx_vhosts is defined
tags: nginx tags: nginx

View File

@ -2,11 +2,13 @@
# Note: Debian 9's php-fpm config is identical to Ubuntu 16.04's, so for now we # 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. # 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', '<') when: ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '<')
tags: php-fpm 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', '==')) when: ansible_distribution == 'Ubuntu' or (ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', '=='))
tags: php-fpm tags: php-fpm