This repository has been archived on 2022-08-22. You can view files and clone it, but cannot push or open issues or pull requests.
autonomic.new-hetzner/molecule/default/converge.yml

30 lines
918 B
YAML
Raw Normal View History

2022-05-30 10:59:44 +00:00
---
- name: Converge
hosts: all
vars:
2022-05-31 06:06:40 +00:00
new_hetzner_server_name: autonomic.new-hetzner-molecule
add_users_inventory_hostname: autonomic.new-hetzner-molecule
new_hetzner_server_type: cx11
new_hetzner_server_image: debian-10
new_hetzner_delete_protection: false
new_hetzner_rebuild_protection: false
2022-05-31 07:16:57 +00:00
new_hetzner_user_accounts: files/members.yml
2022-05-31 05:41:55 +00:00
pre_tasks:
- name: Include resource variables
2022-05-31 07:16:57 +00:00
include_vars: "{{ new_hetzner_user_accounts }}"
2022-05-30 10:59:44 +00:00
tasks:
- name: Run the role under test
block:
- import_role:
name: autonomic.new-hetzner
always:
- name: Flush all handlers
meta: flush_handlers
ignore_errors: true
- name: Ensure the server is deleted
hcloud_server:
name: "{{ new_hetzner_server_name }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: absent