Skip to content

Commit 482c7d5

Browse files
committed
Add prepare tasks for the molecule
1 parent 4d45be2 commit 482c7d5

File tree

4 files changed

+17
-0
lines changed

4 files changed

+17
-0
lines changed

.github/workflows/debian.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
matrix:
1616
molecule_distro:
1717
- debian9
18+
- debian10
1819
mongodb_version:
1920
- '4.2'
2021
- '4.0'

molecule/cluster/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ provisioner:
3636
log: true
3737
playbooks:
3838
converge: ${MOLECULE_PLAYBOOK:-../default/converge.yml}
39+
prepare: ${MOLECULE_PLAYBOOK:-../default/prepare.yml}
3940
env:
4041
MONGODB_VERSION: ${MONGODB_VERSION:-4.2}
4142
MONGODB_PACKAGE: ${MONGODB_PACKAGE:-mongodb-org}

molecule/default/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ provisioner:
2323
log: true
2424
playbooks:
2525
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
26+
prepare: ${MOLECULE_PLAYBOOK:-prepare.yml}
2627
env:
2728
MONGODB_VERSION: ${MONGODB_VERSION:-4.2}
2829
MONGODB_PACKAGE: ${MONGODB_PACKAGE:-mongodb-org}

molecule/default/prepare.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- hosts: all
3+
remote_user: root
4+
become: yes
5+
tasks:
6+
- name: Install prerequisite packages for molecule testing for Debian/Ubuntu >= 18
7+
apt:
8+
update_cache: true
9+
name:
10+
- gpg
11+
- dirmngr
12+
when: (ansible_distribution == 'Ubuntu' and ansible_distribution_major_version | int >= 18) or ansible_distribution == 'Debian'
13+
14+

0 commit comments

Comments
 (0)