There are a couple of significant typos in Red Hat Enterprise Linux Automation with Ansible 9.0 (RH294), chapter 7.1. The text has this:
A tasks section in a play is not required. In fact, it is generally a good practice to avoid both roles and tasks sections in a play to avoid confusion about the order in which roles and tasks run.
If you must have a tasks section and roles, it is better to create tasks that use ansible.builtin.import_roles and ansible.builtin.include_roles to run at the correct points in the play's execution.
The typos are with this: ansible.builtin.import_roles and ansible.builtin.include_roles
The problem is that neither of these exist, as seen here:
The correct ones are: ansible.builtin.import_role and ansible.builtin.include_role
role, not roles
Good catch @Tracy_Baker ! I'm opening a Jira for this so the curriculum team can fix it asap.
I'd like to remember that any feedback you have you can send it to the LX Team directly by clicking on the Feedback button, which is present on any page of every course.
You can follow the resolution of this issue here: