From 4029ad23f3c13c85e72379d14169fc0935f9081c Mon Sep 17 00:00:00 2001 From: Zolfa Date: Tue, 5 May 2020 00:32:48 +0200 Subject: [PATCH] Use static import instead of dynamic include When feasible, allows better tag/task filtering. --- roles/coturn/tasks/main.yaml | 2 +- roles/icinga2-monitoring/tasks/main.yaml | 3 +-- roles/ldap/tasks/1_configure_server.yaml | 6 ++---- roles/nginx/tasks/main.yaml | 3 +-- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/roles/coturn/tasks/main.yaml b/roles/coturn/tasks/main.yaml index bfd59c3..c891363 100644 --- a/roles/coturn/tasks/main.yaml +++ b/roles/coturn/tasks/main.yaml @@ -1,6 +1,6 @@ --- - name: 'install coturn' - include_role: name='service' + import_role: name='service' vars: service_name: 'coturn' service_packages: diff --git a/roles/icinga2-monitoring/tasks/main.yaml b/roles/icinga2-monitoring/tasks/main.yaml index 83b7ba4..494876e 100644 --- a/roles/icinga2-monitoring/tasks/main.yaml +++ b/roles/icinga2-monitoring/tasks/main.yaml @@ -1,5 +1,4 @@ -- include_role: - name: 'service' +- import_role: name='service' vars: service_name: 'icinga2' tags: diff --git a/roles/ldap/tasks/1_configure_server.yaml b/roles/ldap/tasks/1_configure_server.yaml index b1a7aad..65a5fcc 100644 --- a/roles/ldap/tasks/1_configure_server.yaml +++ b/roles/ldap/tasks/1_configure_server.yaml @@ -1,6 +1,5 @@ --- -- include_role: - name: 'service' +- import_role: name='service' vars: service_name: 'nscd' service_packages: 'nscd' @@ -17,8 +16,7 @@ - { question: 'slapd/dump_database', value: 'when needed' } - { question: 'shared/organization', value: '{{ ldap_organization }}' } -- include_role: - name: 'service' +- import_role: name='service' vars: service_name: 'slapd' service_packages: diff --git a/roles/nginx/tasks/main.yaml b/roles/nginx/tasks/main.yaml index 8493d95..0c1f277 100644 --- a/roles/nginx/tasks/main.yaml +++ b/roles/nginx/tasks/main.yaml @@ -1,6 +1,5 @@ --- -- include_role: - name: 'service' +- import_role: name='service' vars: service_name: 'nginx' service_packages: