Commit f5350a88 authored by nono's avatar nono
Browse files

Ajout de tests sur le rôle

parent a618a97d
---
- name: Converge
hosts: all
user: root
become: true
tasks:
- name: "Include updates-lqdn"
include_role:
......
---
- name: Create
hosts: localhost
connection: local
gather_facts: false
no_log: "{{ molecule_no_log }}"
tasks:
# TODO: Developer must implement and populate 'server' variable
- when: server.changed | default(false) | bool
block:
- name: Populate instance config dict
set_fact:
instance_conf_dict: {
'instance': "{{ }}",
'address': "{{ }}",
'user': "{{ }}",
'port': "{{ }}",
'identity_file': "{{ }}", }
with_items: "{{ server.results }}"
register: instance_config_dict
- name: Convert instance config dict to a list
set_fact:
instance_conf: "{{ instance_config_dict.results | map(attribute='ansible_facts.instance_conf_dict') | list }}"
- name: Dump instance config
copy:
content: |
# Molecule managed
{{ instance_conf | to_json | from_json | to_yaml }}
dest: "{{ molecule_instance_config }}"
......@@ -2,9 +2,14 @@
dependency:
name: galaxy
driver:
name: delegated
name: vagrant
provider:
name: virtualbox
platforms:
- name: instance
box: debian/bullseye64
memory: 512
cpus: 1
provisioner:
name: ansible
verifier:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment