Skip to content
aliharirianPublic

About

This project contains Ansible playbooks for deploying services and roles tested with Molecule.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DePeak

This project contains Ansible playbooks for deploying services and roles tested with Molecule.

Running Ansible Playbooks

To run an Ansible playbook, use the following command:

ansible-playbook playbooks/<playbook_name>.yml -i inventories/<inventory_file>

Replace <playbook_name> with the name of the playbook (e.g., nginx.yml) and <inventory_file> with your inventory file.

Testing with Molecule

Molecule is used to test Ansible roles.

Prerequisites

  • Python 3.x
  • pip
  • Ansible
  • Molecule (install via pip install molecule)

Running Tests

To run Molecule tests for a role:

cd roles/<role_name>
molecule test

This will create instances, converge the role, verify, and destroy the instances.

Additional Commands

  • molecule create: Create test instances.
  • molecule converge: Apply the role to instances.
  • molecule verify: Run verification tests.
  • molecule destroy: Destroy test instances.

About

This project contains Ansible playbooks for deploying services and roles tested with Molecule.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages