ERROR - None of the provided paths was usable Please specify a valid path with --roles-path

0 votes

Hi Guys,

I have created one role in Ansible. But when I am trying to see the role name, it is showing me the below error.

$ ansible-galaxy list
[WARNING]: - the configured path /root/web does not exist.
usage: ansible-galaxy [-h] [--version] [-v] TYPE ...
Perform various Role and Collection related operations.
positional arguments:
  TYPE
    collection   Manage an Ansible Galaxy collection.
    role         Manage an Ansible Galaxy role.
optional arguments:
  --version      show program's version number, config file location,
                 configured module search path, module location, executable
                 location and exit
  -h, --help     show this help message and exit
  -v, --verbose  verbose mode (-vvv for more, -vvvv to enable connection
                 debugging)
ERROR! - None of the provided paths was usable. Please specify a valid path with --roles-path
Aug 20, 2020 in Ansible by akhtar
• 38,180 points
351 views

1 answer to this question.

0 votes

Hi@akhtar,

You are trying to list down ansible roles in your playbook. But you did not set the path for the role. So set the path in your ansible.cfg file as shown below.

$ vim /etc/ansible/ansible.cfg
[defaults]
inventory = /etc/myhosts.txt
host_key_checking = False
roles_path= /etc/myroles
answered Aug 20, 2020 by MD
• 95,240 points

Related Questions In Ansible

0 votes
1 answer

Error saying "ERROR: ec2_vpc_subnet is not a legal parameter of an Ansible Play"

ec2_vpc_subnet is support from Ansible version 2.0 and ...READ MORE

answered Feb 8, 2019 in Ansible by Dee
189 views
0 votes
1 answer

Error while running playbook consisting of roles - Ansible

You get this error because ansible was ...READ MORE

answered Mar 12, 2019 in Ansible by William
642 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,194 views
+2 votes
1 answer
0 votes
1 answer