Get integration tests running
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Luke Murphy
2020-04-24 14:12:57 +02:00
parent 71cad95079
commit 641faf30bf
25 changed files with 423 additions and 8 deletions

View File

@ -11,10 +11,8 @@
ssh_path: "{{ lookup('env', 'MOLECULE_EPHEMERAL_DIRECTORY') }}/ssh_key"
tasks:
- name: Create SSH key
user:
name: "{{ lookup('env', 'USER') }}"
generate_ssh_key: true
ssh_key_file: "{{ ssh_path }}"
openssh_keypair:
path: "{{ ssh_path }}"
force: true
register: generated_ssh_key
@ -25,7 +23,8 @@
- name: Register SSH key for test instance(s)
hcloud_ssh_key:
name: "{{ ssh_key_name }}"
public_key: "{{ generated_ssh_key.ssh_public_key }}"
public_key: "{{ generated_ssh_key.public_key }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: present
- name: Create molecule instance(s)

View File

@ -40,6 +40,7 @@
- name: Remove registered SSH key
hcloud_ssh_key:
name: "{{ instance_conf[0].ssh_key_name }}"
api_token: "{{ lookup('env', 'HCLOUD_TOKEN') }}"
state: absent
when:
- not skip_instances