Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.33 KB

File metadata and controls

40 lines (28 loc) · 1.33 KB

About

The (examples subdirectory contains usage examples for individual modules. A copy-paste ansible commands are listed below.

Preparation

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".

Examples

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.

Modules iso, iso_info

# 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

Module api

# Get cluster info
ansible-playbook -i localhost, examples/api_get_cluster_info.yml