Skip to content

Commit

Permalink
Merge pull request #498 from ccamacho/main
Browse files Browse the repository at this point in the history
docs: update clean tasks
  • Loading branch information
ccamacho authored Sep 30, 2021
2 parents 82f1c20 + e4a6561 commit 3ab7bdd
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions docs/src/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,27 +166,15 @@ from the project's root folder:

.. code-block:: console
# Create a playbook to run the cleanup tasks
cat << EOF > ./playbooks/clean.yml
---
- name: Clean
hosts: hypervisor_hosts
tasks:
- name: Run the prepare tasks
ansible.builtin.include_role:
name: kubeinit.kubeinit.kubeinit_prepare
tasks_from: main.yml
- name: Clean the environment
ansible.builtin.include_role:
name: kubeinit.kubeinit.kubeinit_libvirt
tasks_from: 10_cleanup
EOF
# Run the cleanup playbook
ansible-playbook \
--user root \
-v -i ./hosts/okd/inventory \
-e kubeinit_stop_after_task=task-cleanup-hypervisors \
--become \
--become-user root \
./playbooks/clean.yml
# Remove cleanup playbook
rm -rf ./playbooks/clean.yml
./playbooks/okd.yml
In this case the deployment will stop just after cleaning the
hypervisors resources. If its required to remove all the guests
in the hypervisors its also possible to add the following variable
`-e kubeinit_libvirt_destroy_all_guests=True`

0 comments on commit 3ab7bdd

Please sign in to comment.