add molecule info
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
vincent 2022-10-09 16:36:39 +02:00
parent 0cdabfdced
commit 5aeaa1be8d
2 changed files with 76 additions and 1 deletions

View File

@ -1,6 +1,6 @@
# ansible
![ansible](img/ansible.png)
![ansible](../img/ansible.png)
## commande ansible

75
IT/ansible/molecule.md Normal file
View File

@ -0,0 +1,75 @@
# molecule
Molecule est un framework permettant de tester les roles ansible.
Il supporte diferent driver:
- Docker (default)
- Vagrant
- Libvirtd
## Hierarchie
Les fichiers de configuration sont instalé dans le role sous `molecule/default`
Les principaux fichier sont les suivants:
- `molecule.yml` configuration central
- `converge.yml` playbook contenant l'appel du role a tester
- `verify.yml` playbook effectuant les tests
### molecule.yml
ce ficheier de config poséde diferent clés principal:
- `dependency`
- `driver`
- `lint`
- `platform`
- `provisioner`
- `scenario`
- `verifier`
## Scenario
Scenario par defaut:
```YAML
scenario:
create_sequence:
- dependency
- create
- prepare
check_sequence:
- dependency
- cleanup
- destroy
- create
- prepare
- converge
- check
- destroy
converge_sequence:
- dependency
- create
- prepare
- converge
destroy_sequence:
- dependency
- cleanup
- destroy
test_sequence:
- dependency
- lint
- cleanup
- destroy
- syntax
- create
- prepare
- converge
- idempotence
- side_effect
- verify
- cleanup
- destroy
```