Joel:
Hello
What is the mistake I am making here. I am practicing roles from the lab, the error says it is unable to find
ansible-role-firewalld , however roles exists and also moved the tasks  and edited deploy_firewalld.yml to use the roles, but still it fails
[thor@ansible-controller firewalld]$ cd roles/
[thor@ansible-controller roles]$ ls -ltr
total 4
drwxrwxr-x 10 thor thor 4096 Dec 30 08:26 ansible_role-firewalld
[thor@ansible-controller roles]$ cd ansible_role-firewalld/
[thor@ansible-controller ansible_role-firewalld]$ ls -ltr
total 36
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 templates
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 files
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 defaults
-rw-rw-r-- 1 thor thor 1328 Dec 30 08:26 README.md
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 vars
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 handlers
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 tests
drwxrwxr-x 2 thor thor 4096 Dec 30 08:26 meta
drwxrwxr-x 2 thor thor 4096 Dec 30 08:42 tasks
[thor@ansible-controller ansible_role-firewalld]$ cd tasks/
[thor@ansible-controller tasks]$ ls -ltr
total 4
-rw-rw-r-- 1 thor thor 227 Dec 30 08:42 main.yml
[thor@ansible-controller tasks]$ vi main.yml 
[thor@ansible-controller tasks]$ pwd          
/home/thor/playbooks/firewalld/roles/ansible_role-firewalld/tasks
[thor@ansible-controller tasks]$ cat main.yml 
---
- name: Install common dependencies
  yum:
    name:
      - firewalld
    state: installed
- name: Start firewalld
  service: name=firewalld state=started enabled=yes
[thor@ansible-controller tasks]$ cd ../../../
[thor@ansible-controller firewalld]$ 
[thor@ansible-controller firewalld]$ cat deploy_firewalld.yml 
- name: Configure Firewalld
  hosts: all
  roles:
    - ansible-role-firewalld
[thor@ansible-controller firewalld]$ ansible-playbook deploy_firewalld.yml -i inventory 
ERROR! the role 'ansible-role-firewalld' was not found in /home/thor/playbooks/firewalld/roles:/home/thor/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/home/thor/playbooks/firewalld
The error appears to have been in '/home/thor/playbooks/firewalld/deploy_firewalld.yml': line 4, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
  roles:
    - ansible-role-firewalld
      ^ here
[thor@ansible-controller firewalld]$ 
        
