SiteHost

SiteHost Ansible Collection

Ansible is an open-source automation tool used for configuration management, application deployment, and task automation. It enables infrastructure as code (IaC), which means that system configurations, application deployments, and even cloud provisioning can be defined and managed using human-readable YAML files. Our SiteHost Ansible collection allows you to perform actions such as provisioning servers on SiteHost with an Ansible script.

Installation

You can use ansible-galaxy to install the SiteHost Ansible Collection:

ansible-galaxy collection install sitehost.cloud

Creating an server

  1. Create an Ansible playbook file test.yml with this content:
    - name: create a 1 core VPS with ubuntu jammy image
    sitehost.cloud.server:
    label: myserver
    location: AKLCITY
    product_code: XENLIT
    image: ubuntu-jammy-pvh.amd64
    api_client_id: ******
    api_key: **********
    state: present
  2. Run the following command to execute the playbook, you will need the -v argument to see the password of the server being created:
    ansible-playbook -v test.yml

Values for Location, Product Code and Image

You can check the complete list with all locations, product codes and images available to deploy a Linux/Windows VPS using our terraform provider.

Complete Documentation

You can see the complete documentation about our Ansible Collection on GitHub.