fusor / catasb

Ansible scripts to setup an 'oc cluster up' environment for testing the Service Catalog and Ansible Service Broker on EC2 or Local
47 stars 33 forks source link

ERROR! the playbook: /setup_local_environment.yml could not be found #97

Open prasenforu opened 7 years ago

prasenforu commented 7 years ago

OS - ubuntu 16.0 Openshit Setup: oc cluster up (using v1.5.0)

When I execute run_setup_local.sh getting following error.

ERROR! the playbook: /setup_local_environment.yml could not be found

After export ANS_CODE=/catasb/local/linux/ansible/ error gone but got following error.

root@ip-172-31-26-21:~/catasb/local/linux# ./run_setup_local.sh
 [WARNING]: provided hosts list is empty, only localhost is available

Enter your dockerhub username: prasenforu
Enter your dockerhub password:
Enter the dockerhub organization you'd like to pull images from: ansibleplaybookbundle

PLAY [localhost] *******************************************************************************************************************************************************

TASK [Gathering Facts] *************************************************************************************************************************************************
ok: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
skipping: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
skipping: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
ok: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
skipping: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
ok: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
ok: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
ok: [localhost]

TASK [openshift_setup : set_fact] **************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "the field 'args' has an invalid value, which appears to include a variable that is undefined. The error was: 'openshift_build_type' is undefined\n\nThe error appears to have been in '/root/catasb/ansible/roles/openshift_setup/tasks/main.yml': line 31, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n  - set_fact:\n    ^ here\n"}
        to retry, use: --limit @/root/catasb/ansible/setup_local_environment.retry

PLAY RECAP *************************************************************************************************************************************************************
localhost                  : ok=5    changed=0    unreachable=0    failed=1
jwmatthews commented 7 years ago

@prasenforu

Please ensure you ran: cd catasb/local/linux ./run_setup_local.sh

It's important the run_setup_local.sh is run from the catasb/local/linux directory.

prasenforu commented 7 years ago

I did from root@ip-172-31-26-21:~/catasb/local/linux# ./run_setup_local.sh [WARNING]: provided hosts list is empty, only localhost is available

jwmatthews commented 7 years ago

@prasenforu FYI, we did run recently on ubuntu and saw a slight change on the way we set PUBLIC_IP.

This PR includes the change https://github.com/fusor/catasb/pull/99

Might be worth you trying to run it again.

Though the error you reported looks to be more of an issue of 'gather_config' and PATHs not behaving as we expected. At the moment I don't have a good feel of what went wrong.

Happy to help try to debug this more if you'd like. You can reach us in #asbroker on freednode IRC if you wanted to chat in real-time, or comments in this issue work too.

prasenforu commented 7 years ago

But any way I have to export ANS_CODE=/catasb/local/linux/ansible/

otherwise I am getting error.

Just quick question does it requires openshift cluster running?

rthallisey commented 7 years ago

@prasenforu catasb will create an openshift cluster for you with the service-catalog and launch the ansible-service-broker inside of it.

ANS_CODE should be ../../ansible if you're running run_setup_local.sh from inside the local/linux directory. Can you run ls in local/linux? Did you copy the ansible directory into local/linux?

prasenforu commented 7 years ago

I did as per instructions of readme file.

And I am running from local/linux but got following error.

ERROR! the playbook: /setup_local_environment.yml could not be found

Then I did export ANS_CODE, error gone

rthallisey commented 7 years ago

@prasenforu copy ansible back out to the top level. It should fix the issue. Can you point to me where it says to copy the ansible dir? That should be fixed.

prasenforu commented 7 years ago

Not clear copy ansible back out to the top level.

U want me to copy ansible folder under local/linux ? from where I am executing run_setup_local.sh script.

rthallisey commented 7 years ago

@prasenforu no, I misunderstood your comment. But, I don't understand how export ANS_CODE=/catasb/local/linux/ansible/ fixes your problem. There is no ansible directory here https://github.com/fusor/catasb/tree/master/local/linux .

prasenforu commented 7 years ago

Now its typo from beginning,

Basically its ANS_CODE=/catasb/ansible

Sorry for that.

rthallisey commented 7 years ago

@prasenforu In run_setup_local.sh can you add echo ${ANS_CODE} like I did below? Let's see what that value is in your env. A correct print would show ../../ansible.

source ../../gather_config
echo ${ANS_CODE}
ansible-playbook ${ANS_CODE}/setup_local_environment.yml --extra-vars "${EXTRA_VARS}" ${extra_args} $@