ANXS / nginx

A fairly flexible and feature full Ansible role for the NGINX web server.
MIT License
151 stars 82 forks source link

cannot find the role #58

Closed lakshmantgld closed 9 years ago

lakshmantgld commented 9 years ago

ERROR: cannot find role in /Users/lakshman/ansible-try1/roles/role/roles/ANXS.hostname i have the downloaded role and i am running with ansible playbook command as following


and i have also set the roles-path as : roles_path = /Users/lakshman/ansible-try1/roles in ansible.cfg

soupdiver commented 9 years ago

Your path does look a bit weird. /Users/lakshman/ansible-try1/roles/role/roles/ANXS.hostname

It looks there is a role/roles too much

lakshmantgld commented 9 years ago

now i have rectified the clumsy path. now where should i place this role named "nginx". Either in /opt/ansible/roles or create a path in ansible.cfg and place it there.

btw what is this ANXS.hostname should i change any file in the role

soupdiver commented 9 years ago

If your role path is /opt/ansible/roles then the role should be placed in /opt/ansible/roles/ANXS.nginx

lakshmantgld commented 9 years ago

SO THE ROLE PATH IS SAME AS WHAT YOU SAID, should i change the role name to "ANXS.nginx".

lakshmantgld commented 9 years ago
screen shot 2015-07-30 at 5 32 03 pm
lakshmantgld commented 9 years ago

i still can't understand how it takes the role. please add execution of role in readme page

soupdiver commented 9 years ago

If you say your role path is the same as I wrote then your current setup is not correct. As you can read on the screenshot you posted the role needs to be placed in /Users/lakshman/ansible-try1/roles/nginx or /opt/local/etc/ansible/roles/nginx and not /opt/ansible/roles/ANXS.nginx

lakshmantgld commented 9 years ago

To be clear: 1) I have placed my roles in the default configuration . i.e /opt/local/etc/ansible/roles/ . so the role named nginx is placed here.

screen shot 2015-07-30 at 5 54 49 pm

2) If i place it under ANXS.nginx, it also gives me an error

screen shot 2015-07-30 at 5 57 05 pm

I am quite confused, please help me with this

soupdiver commented 9 years ago

can you post the out put of ls -la /opt/local/etc/ansible and ls -la /opt/local/etc/ansible/roles?

lakshmantgld commented 9 years ago
screen shot 2015-07-30 at 6 04 20 pm screen shot 2015-07-30 at 6 03 36 pm
soupdiver commented 9 years ago

Rename the folder to nginx As you can see if the outputs before it's looking for nginx and not ANXS.nginx

lakshmantgld commented 9 years ago

so this is like i have created nginx dir , inside that an nginx within that all tasks, handlers,etc,.

now it gives an error like this.

screen shot 2015-07-30 at 6 28 36 pm

if i make just roles/nginx and this nginx contains all tasks, handlers. This gives me an error asking ANXS.nginx

I have worked on roles, but this gives me weird error

soupdiver commented 9 years ago

It's complaining that specific files can't be found. Are they present at all?

lakshmantgld commented 9 years ago

ya they are present

soupdiver commented 9 years ago

If the files are in place I don't know... maybe try creating an empty dir from scratch. Create the playbook which includes the role in that empty dir. Then install put all required roles in a roles subdir and try executing the playbook again.

I'm not totally sure what's wrong with your paths

lakshmantgld commented 9 years ago

ya ok thank you