snowdrop / k8s-infra

Information to bootstrap vms using dedicated server, local machine and setup using Ansible Playbooks
Apache License 2.0
29 stars 14 forks source link

Wrong command logged to delete a VM from inventory #331

Open cmoulliard opened 1 year ago

cmoulliard commented 1 year ago

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
cmoulliard commented 1 year ago

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

jacobdotcosta commented 1 year ago

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.

cmoulliard commented 1 year ago

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

Please check and fix them @jacobdotcosta