emil f806a44369 i-27: Fixes failing molecule scenario (#28)
1. Generate and inject random ssh admin password prior to running the tests.
2. Add having a ssh client and `sshpass` installed on the local machine as a prerequisite in `README.md`.

Co-authored-by: emil <emil@theliberatededge.org>
Reviewed-on: #28
2024-08-18 22:28:04 +00:00

33 lines
839 B
YAML

---
version: '3'
tasks:
init-project:
cmds: [pipenv install --dev]
pipenv-shell:
cmds: [pipenv shell]
format-yml:
cmds: [yamlfix .]
lint-yml:
deps: [format-yml]
cmds: [yamllint .]
lint-ansible:
deps: [lint-yml]
cmds: [LC_ALL=C.UTF-8 ansible-lint .]
init-tests:
cmds:
- LC_ALL=C.UTF-8 ansible-galaxy install -r requirements-test.yml --force
test-all:
deps: [init-tests]
dir: extensions
cmds:
- |
LC_ALL=C.UTF-8 \
LTE_IMAGE_NAME={{ .LTE_IMAGE_NAME }} \
LTE_CONTAINER_ROOT_PWD={{ .LTE_CONTAINER_ROOT_PWD }} \
molecule test --all
vars:
LTE_IMAGE_NAME:
sh: cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1
LTE_CONTAINER_ROOT_PWD:
sh: cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1