Closed
Description
Summary
The current Ansible playbooks in this repository use the deprecated - include:
directive, which has been removed in recent versions of Ansible. This results in the following error during execution:
[ERROR]: The 'ansible.builtin.include' action plugin has been removed. Use include_tasks or import_tasks instead.
Files Affected
Examples include:
roles/customize-browser/tasks/main.yml
roles/install-tools/tasks/main.yml
Suggested Fix
Replace all instances of:
- include: somefile.yml
With either:
- import_tasks: somefile.yml
Or, if you're using when
, tags
, or need runtime flexibility:
- include_tasks: somefile.yml
Command Used to Fix
find . -type f -name "*.yml" -exec sed -i 's/^[[:space:]]*- include:/- import_tasks:/g' {} +
⚠️ Please manually review files that usewhen:
conditions to decide betweenimport_tasks
andinclude_tasks
.
Additional Context
This change is necessary for compatibility with Ansible versions released after May 2023 and to ensure future stability.
Let me know if you'd like me to open a pull request for this fix!
Metadata
Metadata
Assignees
Labels
No labels