27 Commits
0.0.1 ... 0.2.1

Author SHA1 Message Date
d98183e095 Add change log entry
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-29 12:48:06 +02:00
03671f5ead Pin hcloud under testing
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-29 10:57:18 +02:00
33e2a4f2bf Upgrade Molecule 2020-04-29 10:57:12 +02:00
10d26d1518 Only trigger on master builds
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-27 21:16:59 +02:00
d2d548b166 Take a clarifying pass at README
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-27 16:27:23 +02:00
837de64be9 Clarify change log entry
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-04-27 16:15:17 +02:00
5786a60678 Add note about reduced configurations work
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-27 16:01:00 +02:00
671e92cd0b Actually don't embed prepare.yml
It can be customised if needed, otherwise not used.
2020-04-27 16:00:39 +02:00
dfb003fdcb Remove embedded converge.yml
All checks were successful
continuous-integration/drone/push Build is passing
See https://github.com/ansible-community/molecule/issues/2675.
2020-04-27 15:51:28 +02:00
a2ee39a2f0 Converge must stay for now
Some checks reported errors
continuous-integration/drone/push Build was killed
See https://github.com/ansible-community/molecule/issues/2675.
2020-04-27 15:50:45 +02:00
9164e92d38 Add missing change log entry 2020-04-27 15:26:35 +02:00
5f57fb2c95 Have all jobs depend on linters to save resources
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-27 15:25:45 +02:00
3a1602382a Appease linter with spacing
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-04-27 15:25:00 +02:00
5179b284ba Add bundled playbooks
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-04-27 15:20:47 +02:00
218073759f Add molecule.yml so we can override
See https://github.com/ansible-community/molecule/pull/2666.

I also formatted the cookiecutter.json.

This will work when Molecule 3.0.4 is released.
2020-04-27 15:12:27 +02:00
a25533d917 Add place holder for new API function 2020-04-27 15:02:43 +02:00
f55edfc0e4 Add change log entry
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-27 13:09:08 +02:00
4d195ee238 Merge branch 'master' of github.com:ansible-community/molecule-hetznercloud 2020-04-27 13:08:04 +02:00
b89c10a593 Allow py36 in setuptools requires
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-27 13:07:18 +02:00
2112fc77d4 Add other py versions for testing 2020-04-27 13:07:01 +02:00
f7eb777efb Add other py versions for testing
Some checks failed
continuous-integration/drone/push Build is failing
2020-04-27 13:00:46 +02:00
3528f12b2b Add missing 's'
[ci skip]
2020-04-26 21:07:06 +02:00
e3c20bdb26 Add missing header
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-26 00:57:33 +02:00
6e9ac10f8e Add devel build to get feedback
Some checks reported errors
continuous-integration/drone/push Build was killed
2020-04-26 00:55:21 +02:00
a117a862cf Add funding.yml and remove old files
[ci skip]
2020-04-25 11:41:35 +02:00
b13d902d1f Merge branch 'master' of github.com:ansible-community/molecule-hetznercloud
All checks were successful
continuous-integration/drone/push Build is passing
2020-04-25 08:37:36 +02:00
778147afa0 Fixed linting (#13) 2020-04-24 12:42:01 +01:00
13 changed files with 139 additions and 77 deletions

View File

@ -7,6 +7,9 @@ steps:
commands:
- pip install tox==3.14.6
- tox -e linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
@ -17,6 +20,41 @@ steps:
commands:
- pip install tox==3.14.6
- tox -e packaging
depends_on:
- linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
name: py36
steps:
- name: tox -e py36
image: python:3.6-buster
commands:
- pip install tox==3.14.6
- tox -e py36
depends_on:
- linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
name: py37
steps:
- name: tox -e py37
image: python:3.7-buster
commands:
- pip install tox==3.14.6
- tox -e py37
depends_on:
- linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
@ -27,6 +65,27 @@ steps:
commands:
- pip install tox==3.14.6
- tox -e py38
depends_on:
- linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
name: devel
steps:
- name: tox -e devel
image: python:3.8-buster
failure: ignore
commands:
- pip install tox==3.14.6
- tox -e devel
depends_on:
- linters
trigger:
ref:
- "refs/heads/master"
---
kind: pipeline
@ -45,4 +104,9 @@ steps:
depends_on:
- linters
- packaging
- py36
- py37
- py38
trigger:
ref:
- "refs/heads/master"

3
.github/funding.yml vendored Normal file
View File

@ -0,0 +1,3 @@
---
github: decentral1se
liberapay: decentral1se

39
.github/labels.yml vendored
View File

@ -1,39 +0,0 @@
---
# Format and labels used aim to match those used by Ansible project
# https://github.com/marketplace/actions/github-labeler
- name: bug
color: "fbca04"
description: "This issue/PR relates to a bug."
- name: deprecated
color: "fef2c0"
description: "This issue/PR relates to a deprecated module."
- name: docs
color: "4071a5"
description: "This issue/PR relates to or includes documentation."
- name: enhancement
color: "ededed"
description: "This issue/PR relates to a feature request."
- name: feature
color: "006b75"
description: "This issue/PR relates to a feature request."
- name: major
color: "c6476b"
description: "Marks an important and likely breaking change."
- name: packaging
color: "4071a5"
description: "Packaging category"
- name: performance
color: "555555"
description: "Relates to product or testing performance."
- name: skip-changelog
color: "eeeeee"
description: "Can be missed from the changelog."
- name: stale
color: "eeeeee"
description: "Not updated in long time, will be closed soon."
- name: wontfix
color: "eeeeee"
description: "This will not be worked on"
- name: test
color: "0e8a16"
description: "This PR relates to tests, QA, CI."

View File

@ -1,19 +0,0 @@
---
categories:
- title: 'Features'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'fix'
- 'bugfix'
- 'bug'
- title: 'Maintenance'
label: 'chore'
exclude-labels:
- 'skip-changelog'
template: |
## Changes
$CHANGES

View File

@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.1] - 2020-04-29
### Fixed
- Pinned Molecule to avoid issues with `sh` dependency.
## [0.2.0] - 2020-04-27
### Added
- Add bundled playbooks so as to reduce required configuration on end-user side
- Added an internal `molecule.yml` so that `molecule init role` can get good defaults (will work with Molecule >= 3.0.4)
## [0.1.0] - 2020-04-27
### Added
- py36,37,38 are now supported
## [0.0.1] - 2020-04-25
### Added

View File

@ -24,6 +24,7 @@ any financial support from RedHat or Hetzner Cloud for this work.
## Usage
You need to expose a `HCLOUD_TOKEN` environment variable in your environment.
Find out more about how to get one of those [over here](https://docs.hetzner.cloud/#overview-authentication).
```bash
@ -46,7 +47,7 @@ dependency:
driver:
name: hetznercloud
platforms:
- name: my-instance-name
- name: instance
server_type: cx11
image: debian-10
provisioner:
@ -63,7 +64,7 @@ Then just run the role.
$ cd myrolename && molecule test
```
To ease initial debugging for getting thing started, also expose the following
To ease initial debugging for getting things started, also expose the following
environment variables.
```bash
@ -71,6 +72,17 @@ $ export MOLECULE_NO_LOG=False # not so verbose, helpful
$ export MOLECULE_DEBUG=True # very verbose, last ditch effort
```
## Only use `molecule.yml` for configuration
It is being worked on that it is possible to remove all the files except the
`molecule.yml` scenario file in your scenario directory. This is useful when
you only require this plugin to do the default behaviour each time. It is also
useful to reduce maintenance effort for migration of configurations. This
plugin currently embeds the `create.yml` and `destroy.yml` playbooks. All other
playbooks (e.g. prepare, cleanup) can be created as needed and Molecule will
pick them up and run them. Embedding the `converge.yml` awaits [this feature
request](https://github.com/ansible-community/molecule/issues/2675).
## Mirroring
Issues will be responded to on both issue trackers.
@ -98,16 +110,16 @@ The [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.en.html) license.
This is all done on our [drone.autonomic.zone](https://drone.autonomic.zone/autonomic-cooperative/molecule-hetznercloud) setup.
Unit tests and such.
### Unit
```bash
$ pip install tox
$ tox -v
```
Integration tests.
### Integration
(Only doable by [Autonomic Cooperative](https://autonomic.zone/) members.)
Only doable by [Autonomic Cooperative](https://autonomic.zone/) members.
```bash
$ sudo apt install -y direnv

View File

@ -1,5 +1,5 @@
{
"molecule_directory": "molecule",
"role_name": "OVERRIDDEN",
"scenario_name": "OVERRIDDEN"
"molecule_directory": "molecule",
"role_name": "OVERRIDDEN",
"scenario_name": "OVERRIDDEN"
}

View File

@ -0,0 +1,15 @@
---
dependency:
name: galaxy
driver:
name: hetznercloud
platforms:
- name: "{{ cookiecutter.role_name }}"
server_type: cx11
image: debian-10
provisioner:
name: ansible
lint: |
set -e
yamllint .
ansible-lint .

View File

@ -98,3 +98,8 @@ class HetznerCloud(Driver):
"account API token value"
)
sysexit_with_message(msg)
def reset(self):
"""Destroy all resources managed by this plugin."""
# TODO(decentral1se): implement if ever needed
pass

View File

@ -54,13 +54,15 @@
- name: Populate instance config dict
set_fact:
instance_conf_dict: {
'instance': "{{ item.hcloud_server.name }}",
'ssh_key_name': "{{ ssh_key_name }}",
'address': "{{ item.hcloud_server.ipv4_address }}",
'user': "{{ ssh_user }}",
'port': "{{ ssh_port }}",
'identity_file': "{{ ssh_path }}", }
instance_conf_dict:
{
"instance": "{{ item.hcloud_server.name }}",
"ssh_key_name": "{{ ssh_key_name }}",
"address": "{{ item.hcloud_server.ipv4_address }}",
"user": "{{ ssh_user }}",
"port": "{{ ssh_port }}",
"identity_file": "{{ ssh_path }}",
}
with_items: "{{ hetzner_jobs.results }}"
register: instance_config_dict
when: server.changed | bool

View File

@ -44,7 +44,7 @@ keywords =
[options]
use_scm_version = True
python_requires = >=3.8
python_requires = >=3.6
packages = find:
include_package_data = True
zip_safe = False
@ -53,12 +53,12 @@ setup_requires =
setuptools_scm_git_archive >= 1.1
install_requires =
hcloud >= 1.6.3, < 2
molecule >= 3.0.3, <= 3.1
molecule >= 3.0.4, <= 3.1
pyyaml >= 5.3.1, < 6
[options.extras_require]
test =
hcloud >= 1.6.3
hcloud >= 1.6.3, < 2
mock >= 4.0.2, < 5
pytest-cov >= 2.8.1, < 3
pytest-helpers-namespace >= 2019.1.8, < 2020

View File

@ -4,7 +4,7 @@ minversion = 3.14.0
envlist =
linters
packaging
py{38}
py{36,37,38}
devel
skipsdist = True