snowdrop/k8s-infra

Wrong command logged to delete a VM from inventory

cmoulliard opened this issue · 3 comments

Issue

The following command to be executed

TASK [passstore/ansible_inventory : If the folder already exists, fail!] ******************************************************************************************************************************************************
Thursday 15 June 2023  14:52:31 +0200 (0:00:00.439)       0:00:05.173 ********* 
fatal: [localhost]: FAILED! => {"changed": false, "msg": ["The test host folder already exists in pass, to execute the creation first remove that folder using the required playbook.", "$ ansible-playbook ansible/playbook/passstore/passstore_controller_inventory_remove.yml -e vm_name=test -e pass_provider=openstack"]}

do not exist

ansible-playbook ansible/playbook/passstore/passstore_controller_inventory_remove.yml -e vm_name=test -e pass_provider=openstack 
ERROR! the playbook: ansible/playbook/passstore/passstore_controller_inventory_remove.yml could not be found

ansible-playbook ansible/playbook/passstore/passstore_controller_inventory_remove.yml

In fact, the command exists but should be executed at the root of the project and not under ansible as documented !
We should review such a point to improve it. Proposition: we tell to the user that all the ansible commands should be executed at the root of the project or under ansible. If we choose the option 2), then the commands logged should not include ./ansible/....

WDYT ? @jacobdotcosta

Initially the playbooks were to be executed from within the ansible folder as happened with other tools that were documented to be executed from the point of the docs.

At this moment all the commands should be executed at the root folder of the project so there should be no doubt about where to execute them. In the README.adoc file on the root of the project there's a ⚠️ WARNING message stating that "All the commands mentioned on this project are to be executed at the root folder of the repository, except if stated otherwise.".

If it's still documented otherwise anywhere it should be fixed.

If it's still documented otherwise anywhere it should be fixed.

Please check and fix them @jacobdotcosta