A demo project to initialize a Docker environment with Ansible Molecule. The project is configured to use Docker as the driver for instance creation.
We deploy the components in Docker containers, demo_01 and demo_02:
- demo_01: container created from a Rocky Linux Docker image
- demo_02: container created from a Ubuntu Docker image
Images in the dockerfiles folder are configured to use systemd in Docker containers, so that services can be restarted.
- A Linux distribution
- Docker
Usage run.sh [OPTIONS] [COMMAND]
Options:
-h, --help Display help
-l, --lint Analyzing the syntax of Ansible code
-i, --install Installing Ansible dependencies
-f, --force Remove Docker image before build
-v, --verbose Make the command more talkative
Use the provisioner to start the instances:
./run.sh molecule create
Use the provisioner to configure instances and deploy components:
./run.sh molecule converge
In a browser, you can check that the components are properly deployed:
Run automated tests against instances:
./run.sh molecule verify
Run a full test sequence:
./run.sh molecule test
Use the provisioner to destroy the instances:
./run.sh molecule destroy
Analysis of code, installing dependencies and start the instances:
./run.sh -v -l -i molecule create
Launch Ansible code analysis:
./run.sh --lint
Installing Ansible roles and collections:
./run.sh --install
Distributed under the MIT License.