This Ansible collection contains modules to work with public API for servers.com. Documentation for the API is avaiable at https://developers.servers.com.
You need to have an active account in servers.com (https://portal.servers.com). Some operations (new servers and instances, etc) require payments.
You need ansible 2.9+, python 3.6 or newer and requests library to use those modules.
From Ansible Galaxy:
ansible-galaxy collection install serverscom.sc_api
From this repository:
ansible-galaxy collection install https://github.com/serverscom/serverscom-ansible/... tar.gz
git clone https://github.com/serverscom/serverscom-ansible.git
cd ansible_collections/serverscom/sc_api
ansible-galaxy collection build
- You need to issue a public API token from https://portal.servers.com/#/profile/api-token. It's used as
token
parameter for all modules. - Configure
COLLECTION_PATH
(if you are using custom path for collections). - Use modules by FQCN (Fully Qualified collection name), f.e.
serverscom.sc_api.sc_ssh_key
or by usingcollections:
keyword in the play.
You can see documentation for individual modules by calling (after installation) ansible-doc module_name
, f.e. ansible-doc sc_ssh_key
.
sc_baremetal_locations_info
- List of available baremetal locationssc_cloud_computing_regions_info
- List of cloud computing regionssc_baremetal_servers_info
- List of baremetal serverssc_dedicated_server_info
- Information about one dedicated serversc_dedicated_server_reinstall
- Reinstallation of serverssc_ssh_key
- SSH key managementsc_ssh_keys_info
- List of registered SSH keyssc_cloud_computing_regions_info
- Lisf of cloud computing regionssc_cloud_computing_flavors_info
- List of flavors in a given regionsc_cloud_computing_openstack_credentials
- Credentials to Openstack APIsc_cloud_computing_instances_info
- List of cloud computing instancessc_cloud_computing_instance_info
- Information about specific instancesc_cloud_computing_images_info
- Information about images for cloud computingsc_cloud_computing_flavors_info
- Information about flavors for cloud computingsc_cloud_computing_instance
- Create/delete/reinstall/upgrade instancesc_cloud_computing_instance_ptr
- Manage PTR records for cloud computing instancessc_cloud_computing_instance_state
- Manage shutdown/rescue/rebooted state for instancesc_l2_segment_info
- information about L2 segmentsc_l2_segments_info
- list of existing L2 segmentssc_l2_segment
- Creation/delelition/membership modification for L2 segmentssc_l2_segment_aliases
- Adding and removing IP addresses to/from L2 segments