Skip to content
Snippets Groups Projects

test role

This is a ansible-role for testing your installed ansible.

Requirements

  • To have ansible installed at your system.

Role Variables

You should look around where the variables are setted. And figure it out from where the ouput comes

Dependencies

This role have no dependency from any another role.

Example Playbook

Here is an example for adding this role for your playbook for restarting the c3infodesk-printer. containers:

- hosts:
    - example_servers_group
  roles:
    - test

And call the playbook as:

ansible-playbook -i <INVENTORY> <PLAYBOOK_NAME>.yml

Tests

Here are the tests made at CI-CD for this role.

The tests should be runned at the root directory from the repository.

Syntax

ansible-playbook --syntax-check -i invenvories/hosts playbooks/examples/example_01_test.yml

Lint

ansible-lint ci-cd/01_test.yml

molecule

cd roles/test
molecule test

License

MIT/BSD

Author Information

https://chaos.social/@fejao