Fully Clean Lightbits From Servers or a Cluster
To fully clean Lightbits packages and configuration from a server, run the following steps.
Do not run this on servers that are active or show up on a Lightbits cluster. Only run this against servers that need Lightbits removed; otherwise, the cluster state will be at risk. All of the commands run from the servers must be run as highest privilege (root). In order to only clean up the Lightbits configuration from a server, see Recovering from Cluster Installation Failure.
From the Ansible host, run the cleanup playbook to unconfigure the server.
If using the Ansible method, run this:
cd ~/light-app
ansible-playbook -i ansible/inventories/cluster_example/hosts playbooks/cleanup-lightos-playbook.yml -t cleanup_all --limit <server_name>
If using the Docker method, run this:
cd ~/light-app
docker run -it --rm --net=host \
-e UID=`id -u` \
-e GID=`id -g` \
-e UNAME=$USER \
-v `pwd`:/ansible \
-w /ansible \
-e ANSIBLE_LOG_PATH=/ansible/ansible.log \
docker.lightbitslabs.com/lightos-3-(Minor Ver)-(Rev)-rhl-(8/9)/lb-ansible:v9.13.0 \
sh -c 'ansible-playbook -i ansible/inventories/cluster_example/hosts \
playbooks/cleanup-lightos-playbook.yml -t cleanup_all --limit <server_name>'
Make sure <server_name> matches the name of the server from where Lightbits must be removed. Typically, it will be of the form "server00" or "server01", etc.