@@ -7,16 +7,9 @@ This directory is the home of the test playbooks:
7
7
8
8
# Molecule
9
9
10
- The default tested version is postgresql 9.6, 10, 11, 12, and 13 on Ubuntu 20.04. We are currently _ not _ linting anything .
10
+ The default tested version is postgresql 9.6, 10, 11, 12, and 13 on Ubuntu 20.04. Linting is disabled for the tests .
11
11
12
- ```
13
- lint: |
14
- set -e
15
- # yamllint .
16
- # ansible-lint
17
- ```
18
-
19
- You can override this with setting the environment variable MOLECULE_DISTRO to one of:
12
+ The default distribution is ubuntu2004. You can override th with setting the environment variable MOLECULE_DISTRO to one of:
20
13
21
14
* centos7
22
15
* centos8
@@ -27,12 +20,6 @@ You can override this with setting the environment variable MOLECULE_DISTRO to o
27
20
* ubuntu1804
28
21
* ubuntu2004
29
22
30
- The images we use are extended with systemd by Jeff Geerling. Before we start the tests, ` molecule ` runs the ` prepare.yml ` playbook to:
31
-
32
- * Create a user called ` ansbile ` , with the default group membership of either ` wheel ` (CentOS, Fedora), or ` sudo ` (Debian, ubuntu)
33
- * Install a couple of packages that Jeff Geerling did not install in his container images, that we need in order to test the role properly
34
-
35
-
36
23
Manual execution of the molecule tests with the distro of your liking. Examples:
37
24
38
25
```
@@ -41,6 +28,13 @@ MOLECULE_DISTRO=debian10 molecule converge
41
28
MOLECULE_DISTRO=ubuntu2004 molecule converge
42
29
```
43
30
31
+ The images we use are extended with systemd by Jeff Geerling. See https://hub.docker.com/u/geerlingguy/
32
+
33
+ Prior to the testing, molecule runs the prepare.yml playbook to:
34
+
35
+ * Create a user called ` ansible ` , with the default group membership of either ` wheel ` (CentOS, Fedora), or ` sudo ` (Debian, ubuntu)
36
+ * Install a couple of packages that Jeff Geerling did not install in his container images, that are needed in order to test the role properly
37
+
44
38
The main file ./molecule/default/molecule.yml sets up versions to test from 9.6 to 13.
45
39
46
40
# Tests
@@ -74,12 +68,19 @@ pip install molecule molecule-docker
74
68
75
69
# Examples
76
70
77
- Examples :
71
+ To run molecule tests locally, you can run the following commands :
78
72
79
73
```
74
+ #--- to just create the default containers (ubuntu2004), and run prepare.yml
80
75
molecule create
76
+
77
+ #--- to run the tests and keep the containers
81
78
molecule converge
79
+
80
+ #--- full life cycle of tests
82
81
molecule test
82
+
83
+ #--- to clean up (i.e after converge, if you would like to change to a different distribution)
83
84
molecule destroy
84
85
85
86
#--- with specific distro release
@@ -88,6 +89,7 @@ MOLECULE_DISTRO=ubuntu2004 molecule converge
88
89
MOLECULE_DISTRO=ubuntu2004 molecule test
89
90
MOLECULE_DISTRO=ubuntu2004 molecule destroy
90
91
```
92
+
91
93
# References
92
94
93
95
* https://github.com/search?q=user%3Ageerlingguy+docker-.*-ansible
0 commit comments