catasb icon indicating copy to clipboard operation
catasb copied to clipboard

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

Open prasenforu opened this issue 8 years ago • 11 comments

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


prasenforu avatar Jul 24 '17 12:07 prasenforu

@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.

jwmatthews avatar Jul 24 '17 12:07 jwmatthews

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

prasenforu avatar Jul 24 '17 13:07 prasenforu

@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.

jwmatthews avatar Jul 26 '17 18:07 jwmatthews

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?

prasenforu avatar Jul 28 '17 04:07 prasenforu

@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?

rthallisey avatar Jul 28 '17 12:07 rthallisey

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

prasenforu avatar Jul 28 '17 12:07 prasenforu

@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.

rthallisey avatar Jul 28 '17 12:07 rthallisey

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.

prasenforu avatar Jul 28 '17 14:07 prasenforu

@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 .

rthallisey avatar Jul 28 '17 14:07 rthallisey

Now its typo from beginning,

Basically its ANS_CODE=/catasb/ansible

Sorry for that.

prasenforu avatar Jul 28 '17 14:07 prasenforu

@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} $@

rthallisey avatar Jul 28 '17 14:07 rthallisey