roaldnefs / ansible-collection-transip

:package: TransIP Ansible Collection. It allows you to create, read and update resources on TransIP with ease using Ansible.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TransIP Collection

CI

This collection contains modules and plugins to assist in automating TransIP infrastructure and API interactions with Ansible

Tested with Ansible

Tested with the current Ansible 2.9 and 2.10 release and the current development version of Ansible. Ansible versions before 2.9.10 are not supported.

Included content

  • transip_sshkey – Manage TransIP SSH keys
  • transip_vps – Create and delete a TransIP VPS

Installation and Usage

Installing the Collection from Ansible Galaxy

Before using the TransIP collection, you need to install it with the Ansible Galaxy CLI:

ansible-galaxy collection install roaldnefs.transip

You can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yaml, using the format:

---
collections:
  - name: roaldnefs.transip
    version: 0.2.0

Using modules from the TransIP Collection in your playbooks

It's preferable to use content in this collection using their Fully Qualified Collection Namespace (FQCN), for example: roaldnefs.transip.transip_vps:

---
- hosts: localhost
  gather_facts: false
  connection: local

  task:
    - name: Create a new VPS
      roaldnefs.transip.transip_vps:
        state: present
        description: "example vps description"
        unique_description: yes
        product_name: vps-bladevps-x1
        operating_system: ubuntu-18.04
        access_token: REDACTED
      register: result

Testing and Development

If you want to develop new content for this collection or improve what's already here, the easiest way to work on the collection is to clone it into one of the configured COLLECTIONS_PATHS, ans work on it there.

Testing with ansible-test

The tests directory contains configuration for running sanity and integeration tests using ansible-test.

You can run the collection's test suites with the commands:

ansible-test sanity --docker -v --color
ansible-test integration --docker -v --color

Note: To run integration tests, you must add an integration_config.yml file with a valid TransIP API key (using variable transip_api_key).

Release notes

See the changelog.

Release process

Releases are automatically built and pushed to Ansible Galaxy for any new tag. Before tagging a release, make sure to do the following:

  1. Update galaxy.yml and this README's requirements.yml example with the new version for the collection.
  2. Update the CHANGELOG:
    1. Make sure you you have antsibull-changelog installed.
    2. Make sure there are fragments for all known changes in changelogs/fragments.
    3. Run antsibull-changelog release.
  3. Commit the changes and create a PR with the changes. Wait for tests to pass, then merge it once they have.
  4. Tag the version in Git and push to GitHub.

After the version is published, verify it exists on the TransIP Collection Galaxy page.

More information

Licensing

GNU General Public License v3.0 or later.

See COPYING to see the full text.

About

:package: TransIP Ansible Collection. It allows you to create, read and update resources on TransIP with ease using Ansible.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%