Replace include usage with include_tasks and import_tasks

The long-deprecated (since Ansible 2.4) use of include is
no more.
This commit is contained in:
Slavi Pantaleev
2019-01-03 15:24:08 +02:00
parent 76506f34e0
commit 99af4543ac
12 changed files with 48 additions and 48 deletions

View File

@ -31,8 +31,8 @@
# Method specific tasks follow
- include: tasks/setup/ssl/setup_ssl_lets_encrypt.yml
- import_tasks: tasks/setup/ssl/setup_ssl_lets_encrypt.yml
- include: tasks/setup/ssl/setup_ssl_self_signed.yml
- import_tasks: tasks/setup/ssl/setup_ssl_self_signed.yml
- include: tasks/setup/ssl/setup_ssl_manually_managed.yml
- import_tasks: tasks/setup/ssl/setup_ssl_manually_managed.yml

View File

@ -26,7 +26,7 @@
when: "matrix_ssl_retrieval_method == 'lets-encrypt'"
- name: Obtain Let's Encrypt certificates
include_tasks: "tasks/setup/ssl/setup_ssl_lets_encrypt_obtain_for_domain.yml"
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_lets_encrypt_obtain_for_domain.yml"
with_items: "{{ domains_requiring_certificates }}"
loop_control:
loop_var: domain_name

View File

@ -1,7 +1,7 @@
---
- name: Verify certificates
include_tasks: "tasks/setup/ssl/setup_ssl_manually_managed_verify_for_domain.yml"
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_manually_managed_verify_for_domain.yml"
with_items: "{{ domains_requiring_certificates }}"
loop_control:
loop_var: domain_name

View File

@ -17,7 +17,7 @@
when: "matrix_ssl_retrieval_method == 'self-signed' and ansible_os_family == 'Debian'"
- name: Generate self-signed certificates
include_tasks: "tasks/setup/ssl/setup_ssl_self_signed_obtain_for_domain.yml"
include_tasks: "{{ role_path }}/tasks/setup/ssl/setup_ssl_self_signed_obtain_for_domain.yml"
with_items: "{{ domains_requiring_certificates }}"
loop_control:
loop_var: domain_name