Add bundled playbooks
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Luke Murphy 2020-04-27 15:20:47 +02:00
parent 218073759f
commit 5179b284ba
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
6 changed files with 32 additions and 15 deletions

View File

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [0.2.0] - 2020-04-27
### Added
- Add bundle playbooks so that the only required config is `molecule.yml`
## [0.1.0] - 2020-04-27
### Added

View File

@ -1,7 +0,0 @@
---
- name: Converge
hosts: all
tasks:
- name: "Include integration"
include_role:
name: "integration"

View File

@ -0,0 +1,7 @@
---
- name: Converge
hosts: all
tasks:
- name: "Include {{ cookiecutter.role_name }}"
include_role:
name: "{{ cookiecutter.role_name }}"

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

@ -43,7 +43,7 @@
state: absent
when:
- not skip_instances
- instance_conf | length # must contain at least one instance
- instance_conf | length # must contain at least one instance
- name: Populate instance config
set_fact:

View File

@ -0,0 +1,9 @@
---
- name: Prepare
hosts: all
gather_facts: false
tasks:
- name: Install python for Ansible
raw: test -e /usr/bin/python || (apt -y update && apt install -y python-minimal python-zipstream)
become: true
changed_when: false