Add bundled playbooks
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
218073759f
commit
5179b284ba
@ -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
|
||||
|
@ -1,7 +0,0 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include integration"
|
||||
include_role:
|
||||
name: "integration"
|
7
molecule_hetznercloud/playbooks/converge.yml
Normal file
7
molecule_hetznercloud/playbooks/converge.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: "Include {{ cookiecutter.role_name }}"
|
||||
include_role:
|
||||
name: "{{ cookiecutter.role_name }}"
|
@ -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
|
@ -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:
|
9
molecule_hetznercloud/playbooks/prepare.yml
Normal file
9
molecule_hetznercloud/playbooks/prepare.yml
Normal 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
|
Loading…
Reference in New Issue
Block a user