Skip to content

Commit 6819bd5

Browse files
committed
refactor: Update molecule template
Since we are now reading group_vars in molecule through links, it is important to add the required config for new molecule roles. This commit updates the template to include these changes. Signed-off-by: Amartya Sinha <[email protected]>
1 parent 0e212d9 commit 6819bd5

File tree

2 files changed

+33
-11
lines changed

2 files changed

+33
-11
lines changed

_skeleton_role_/molecule/default/molecule.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# Mainly used to override the defaults set in .config/molecule/
3+
# By default, it uses the "config_podman.yml" - in CI, it will use
4+
# "config_local.yml".
5+
#
6+
# Do not add host_vars and group_vars within this config file.
7+
# To add host_vars, uncomment the links: host_vars config and add
8+
# host_vars file in roles/{{ role_name }}/molecule/host_vars/instance.yml.
9+
#
10+
# To add group_vars, uncomment platforms section so that
11+
# the molecule test is added to required groups. After that,
12+
# create group_vars/molecule/{{ role_name }}_molecule.yml file
13+
# and add group_vars specific to this molecule test there.
14+
#
15+
# Reason is, you can either have links to group_vars/host_vars
16+
# or add group_vars/host_vars directly. Ref [1]
17+
# [1] https://ansible.readthedocs.io/projects/molecule/configuration/#provisioner-pre-ansible-native
18+
log: true
19+
20+
#platforms:
21+
# - name: instance
22+
# groups:
23+
# - molecule
24+
# - {{ role_name }}_molecule
25+
26+
provisioner:
27+
name: ansible
28+
log: true
29+
env:
30+
ANSIBLE_STDOUT_CALLBACK: yaml
31+
# inventory:
32+
# links:
33+
# host_vars: ./host_vars/

0 commit comments

Comments
 (0)