Skip to content

sitehostnz/sitehost_ansible

Repository files navigation

SiteHost - Ansible Collection

Requirements

Setup

Install dependencies

First you will need to install a compatible version of python as defined above. Then you can install the depency with pip.

pip install ansible
pip install requests

Install the Ansible Collection

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

ansible-galaxy collection install sitehost.cloud

Usage

Once the Collection is installed, you can reference it by its Fully Qualified Collection Namespace (FQCN): sitehost.cloud.module_name.

In order to use this collection, the SH_API_KEY and SH_CLIENT_ID environment variable must be set to your SiteHost api key and client id respectively. Alternatively, you can pass your api key and client id to the api_key and api_client_id option of the modules you are calling.

Please ensure that the appropriate module permission is granted to the API key to use the relevant Ansible module.

Example Playbook

- 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: "{{ CLIENT_ID }}"
    api_key: "{{ USER_API_KEY }}"
    state: present

Modules

Name description
sitehost.cloud.server Manages SiteHost virtual server
sitehost.cloud.dns Manages SiteHost DNS records and zones
sitehost.cloud.stack Manages SiteHost Cloud Containers

About

SiteHost Ansible Collection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages