项目作者: cloudscale-ch

项目描述 :
cloudscale.ch Ansible Collection
高级语言: Python
项目地址: git://github.com/cloudscale-ch/ansible-collection-cloudscale.git
创建时间: 2020-05-05T10:20:06Z
项目社区:https://github.com/cloudscale-ch/ansible-collection-cloudscale

开源协议:GNU General Public License v3.0

下载


Collection Integration tests
Codecov
License

Ansible Collection for cloudscale.ch Cloud

This collection provides a series of Ansible modules and plugins for interacting with the cloudscale.ch Cloud.

Installation

To install the collection hosted in Galaxy:

  1. ansible-galaxy collection install cloudscale_ch.cloud

To upgrade to the latest version of the collection:

  1. ansible-galaxy collection install cloudscale_ch.cloud --force

Usage

Playbooks

To use a module from the cloudscale.ch collection, please reference the full namespace, collection name, and modules name that you want to use:

  1. ---
  2. - name: Using cloudscale.ch collection
  3. hosts: localhost
  4. tasks:
  5. - cloudscale_ch.cloud.server:
  6. name: web1
  7. image: debian-10
  8. flavor: flex-2
  9. ssh_keys:
  10. - ssh-rsa XXXXXXXXXX...XXXX ansible@cloudscale
  11. server_groups: web-group
  12. zone: lpg1
  13. api_token: ...

Or you can add the full namespace and collection name in the collections element:

  1. ---
  2. - name: Using cloudscale.ch collection
  3. hosts: localhost
  4. collections:
  5. - cloudscale_ch.cloud
  6. tasks:
  7. - server:
  8. name: web1
  9. image: debian-10
  10. flavor: flex-2
  11. ssh_keys:
  12. - ssh-rsa XXXXXXXXXX...XXXX ansible@cloudscale
  13. server_groups: web-group
  14. zone: lpg1
  15. api_token: ...

Roles

For existing Ansible roles, please also reference the full namespace, collection name, and modules name that are used in tasks instead of just modules name.

Plugins

To use a plugin, please reference the full namespace, collection name, and plugins name that you want to use:

  1. plugin: cloudscale_ch.cloud.<myplugin>

Contributing

There are many ways in which you can participate in the project, for example:

  • Submit bugs and feature requests, and help us verify them as they are checked in
  • Review source code changes
  • Review the documentation and make pull requests for anything from typos to new content
  • If you are interested in fixing issues and contributing directly to the code base, please see the CONTRIBUTING document.

Releasing

Prepare a new release

The changelog is managed using the antsibull tool. You can install
it using pip install antsibull

  1. Update version in galaxy.yml
  2. Update changelog using antsibull
    1. antsibull-changelog release
  3. Commit changelog and new version
    1. git commit -m "Release version X.Y.Z" galaxy.yml CHANGELOG.rst changelogs/
  4. Tag the release. Preferably create a GPG signed tag if you have a GPG
    key. Version tags should be prefixed with “v” (otherwise the
    integration tests won’t run automatically).
    1. git tag -s -m "Version X.Y.Z" vX.Y.Z
  5. Push the release and tag
    1. git push origin master vX.Y.Z

Release to Ansible Galaxy

After the release is tagged and pushed to Github a release to Ansible
Galaxy can be created using the release feature in Github:

  1. Wait for integration tests to succeed. They should automatically
    run on new tags.
    Only release if they succeed. Otherwise delete the
    tag and fix the issue.
  2. Create a release on Github by going to the release overview and
    selecting “Draft a new release”.

License

GNU General Public License v3.0

See COPYING to see the full text.