Compare commits

..
10 Commits
Author SHA1 Message Date
decentral1se ef8c7e3381 Merge pull request 'Handle case of absent instance_config.yml gracefully' (#13) from improved-failure-handling into main
continuous-integration/drone/push Build is passing
Reviewed-on: #13
2021-06-28 14:28:14 +02:00
Benjamin Wenzelanddecentral1se 8bf5ca3ed2 Handle case of absent instance_config.yml gracefully
continuous-integration/drone/pr Build was killed
continuous-integration/drone/push Build is passing
i.e., instead of throwing a red fatal error message at the user and
recovering with a rescue block we downgrade the lookup error to a
warning and set the same defaults in that case that were set in the
rescue block before.

See https://github.com/ansible-community/molecule-hetznercloud/issues/31.
2021-06-28 14:20:00 +02:00
decentral1se 6427696ce4 Add that dep
continuous-integration/drone/push Build is passing
2021-06-02 13:21:37 +02:00
decentral1se f9f989cf58 Document for all
continuous-integration/drone/push Build is passing
2021-06-02 13:14:05 +02:00
decentral1se f43a697629 Use bold in right place and merge
continuous-integration/drone/push Build is passing
2021-06-02 13:06:57 +02:00
decentral1se e479213a6e Add toolset link
continuous-integration/drone/push Build is passing
2021-06-02 13:05:25 +02:00
decentral1se f7f843539d Add warning
continuous-integration/drone/push Build is passing
2021-06-02 13:04:04 +02:00
decentral1se 5180ae639d Some further clean up on the log [ci skip] 2021-06-02 13:03:10 +02:00
decentral1se 9831d31ed8 Add credit
continuous-integration/drone/push Build is passing
2021-06-02 12:56:00 +02:00
decentral1se 060d2ad829 Add change log entry
continuous-integration/drone/push Build is passing
2021-06-02 12:55:19 +02:00
3 changed files with 34 additions and 26 deletions
+10 -2
View File
@@ -7,15 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [1.2.1] - 2021-06-02
### Fixed
- Remove async task handling for network deletion ([#30](https://github.com/ansible-community/molecule-hetznercloud/pull/30), credit @ggggut)
## [1.2.0] - 2021-06-02
### Added
- Allow to create networks during test runs ([#29](https://github.com/ansible-community/molecule-hetznercloud/pull/29), thanks @ggggut!)
## [1.1.0] - 2021-03-30
## Changed
- Relaxed bounds on Molecule to allow all versions < v4 ([#27](https://github.com/ansible-community/molecule-hetznercloud/pull/27))
- Relaxed bounds on Molecule to allow all versions less than `v4` ([#27](https://github.com/ansible-community/molecule-hetznercloud/pull/27))
## [1.0.0] - 2021-01-06
@@ -33,7 +41,7 @@ tracker so that we can mention them here.
## [0.2.2] - 2020-06-15
## Fixed
### Fixed
- Point to an open issue tracker
+14 -14
View File
@@ -27,6 +27,8 @@ any financial support from RedHat or Hetzner Cloud for this work.
$ pip install molecule-hetznercloud
```
If you're looking for a container approach, see [ansible-community/toolset](https://github.com/ansible-community/toolset).
## Upgrade
Please see the [CHANGELOG.md](./CHANGELOG.md) for migration guides.
@@ -87,13 +89,11 @@ $ export MOLECULE_DEBUG=True # very verbose, last ditch effort
## Volume Handling
It is possible to have the driver manage volumes during the test run.
> **WARNING**: this feature appears to be broke. See [#24](https://github.com/ansible-community/molecule-hetznercloud/issues/24) for more
You can add the following stanza to your Molecule configuration to have
Molecule create this volume for the managed VPS. This volume will be cleaned up
after use (**Please note**: there is a bug raised against clean-up right now,
see [#24](https://github.com/ansible-community/molecule-hetznercloud/issues/24)
for more).
It is possible to have the driver manage volumes during the test run. You can
add the following stanza to your Molecule configuration to have Molecule create
this volume for the managed VPS. This volume will be cleaned up after use.
```yaml
platforms:
@@ -202,12 +202,12 @@ $ tox -v
### Integration
Only doable by [Autonomic Cooperative](https://autonomic.zone/) members.
```bash
$ sudo apt install -y direnv
$ cp .envrc.sample .envrc
$ direnv allow
$ pip install -e . ansible
$ cd integration && molecule test
```
git clone https://github.com/ansible-community/molecule-hetznercloud.git
cd molecule-hetznercloud
python3 -m venv .venv && source .venv/bin/activate
pip install -e . "ansible<4" netaddr
export INSTANCE_UUID=$(openssl rand -hex 5)
export HCLOUD_TOKEN=YOURKEY
cd integration && molecule test
```
+10 -10
View File
@@ -6,16 +6,16 @@
no_log: "{{ molecule_no_log }}"
tasks:
- name: Populate the instance config
block:
- name: Populate instance config from file
set_fact:
instance_conf: "{{ lookup('file', molecule_instance_config) | from_yaml }}"
skip_instances: false
rescue:
- name: Populate instance config when file missing
set_fact:
instance_conf: {}
skip_instances: true
set_fact:
instance_conf: "{{ lookup('file', molecule_instance_config, errors='warn') | from_yaml }}"
skip_instances: false
register: instance_config_lookup
- name: Populate instance config when file missing
set_fact:
instance_conf: {}
skip_instances: true
when: not instance_config_lookup.ansible_facts.instance_conf
- name: Destroy molecule instance(s)
hcloud_server: