The (examples
subdirectory contains usage examples for individual modules.
A copy-paste ansible commands are listed below.
You need to install ansible, the scale_computing.hypercore
collection,
and export required environment variables (SC_HOST
etc.) to define target HyperCore cluster.
Details are in DEVELOPMENT.md, section "Prepare development environment".
The examples are run from localhost (ansible-playbook -i localhost,
part),
and playbooks contain connection: local
.
This allows to use environ variables from local shell environment.
If ansible will execute an example via SSH connection (e.g. without connection: local
),
then you need to add to examples environment section with SC_HOST
and other environment variables.
In iso_info.yml is this included as an example.
# List ISO images
ansible-playbook -i localhost, examples/iso_info.yml
# Get TinyCore-current.iso from http://tinycorelinux.net/
ansible-playbook -i localhost, examples/iso.yml
# Remove old TinyCore-current.iso if present, to force re-upload
ansible-playbook -i localhost, -e iso_remove_old_image=True examples/iso.yml
# Get cluster info
ansible-playbook -i localhost, examples/api_get_cluster_info.yml