From 39bd8590709dd5b3967c769edb9b6791aa9d091d Mon Sep 17 00:00:00 2001 From: Arthur BOUDREAULT Date: Tue, 12 Oct 2021 14:34:35 +0000 Subject: [PATCH] =?UTF-8?q?=E2=99=BBrefactor:=20using=20latest=20ansible?= =?UTF-8?q?=20module=20to=20be=20more=20future-proof=20and=20support=20lat?= =?UTF-8?q?est=20ansible=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ansible-lint: ``` Include has some unintuitive behaviours depending on if it is running in a static or dynamic in play or in playbook context, in an effort to clarify behaviours we are moving to a new set modules (ansible.builtin.include_tasks, ansible.builtin.include_role, ansible.builtin.import_playbook, ansible.builtin.import_tasks) that have well established and clear behaviours. This module will still be supported for some time but we are looking at deprecating it in the near future. ``` Fix: I have decided to go for ansible include_tasks module because it is more versatile and on a par with this module (for more info about differences between new modules, see [here](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/include_module.html) --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 419d4e0..0544997 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -30,7 +30,7 @@ when: ynh_file_install.stat.exists == False - name: Create extra domains - ansible.builtin.include: domains.yml + ansible.builtin.include_tasks: domains.yml when: ynh_extra_domains - name: Run first Yunohost diagnosis @@ -41,9 +41,9 @@ changed_when: False - name: Add Yunohost users - ansible.builtin.include: users.yml + ansible.builtin.include_tasks: users.yml when: ynh_users - name: Install Yunohost apps - ansible.builtin.include: apps.yml + ansible.builtin.include_tasks: apps.yml when: ynh_apps