Skip to content
Snippets Groups Projects
Commit e46f9714 authored by fejao's avatar fejao
Browse files

Updating the README.md file

parent ed0cd7ce
Branches
No related tags found
No related merge requests found
Pipeline #38401 passed
Pipeline: c3infodesk-deployment

#38402

    ......@@ -137,40 +137,7 @@ This role have no dependency from any another role.
    ```
    ## Testing
    You can test this locally using **DIND (docker in docker)** at your own computer using [ansible molecule](https://ansible.readthedocs.io/projects/molecule/installation/)
    - ### Testing requirements
    You need docker installed at your system and the [ansible molecule](https://ansible.readthedocs.io/projects/molecule/installation/).
    - #### Setting *DIND (docker in docker)*
    You might have to set *DIND (docker in docker)* at your system, for linux, you can create the file **/etc/docker/daemon.json**
    - ##### Enabling DIND at your system
    And add the content and restart docker.
    ```json
    {
    "exec-opts": ["native.cgroupdriver=systemd"],
    "features": {
    "buildkit": true
    },
    "experimental": true,
    "cgroup-parent": "docker.slice"
    }
    ```
    - ### Using the molecule tests
    - #### Configuring the *HOST_VAR_FILE_NAME* variable
    For using the molecule tests you should pass the **HOST_VAR_FILE_NAME** environment variable, or the default value for testing is: **example_printer.yml**
    For the values that can be used, you can lool at the files at the **inventories/host_vars** folder.
    - ##### Molecule test example
    Just go to the root of the role **roles/x3infodesk-deployment-role-dependencies** and run the command, here is an example for using the **HOST_VAR_FILE_NAME** as *example_buttons.yml*:
    ```bash
    HOST_VAR_FILE_NAME="example_buttons.yml" molecule test
    ```
    For testing this role, please reference [how to use molecule tests](https://git.cccv.de/fejao/c3infodesk-deployment-role-dependencies/-/tree/main/molecule)
    ## License
    ......
    ......@@ -7,6 +7,7 @@ It's allways a good idea to test your things.
    With **ansible molecule** you can test your role locally without the need of using a **real server** but a local **docker container**.
    ## Dependencies
    - ### molecule
    ......@@ -34,9 +35,26 @@ With **ansible molecule** you can test your role locally without the need of usi
    ## Configuration
    There's not much for configuring for using the tests
    ## Running the tests
    For running the **molecule tests** you just need to run the command:
    - #### Configuring the *HOST_VAR_FILE_NAME* variable
    For using the molecule tests you should pass the **HOST_VAR_FILE_NAME** environment variable, or the default value for testing is: **example_printer.yml**
    For the values that can be used, you can lool at the files at the **inventories/host_vars** folder.
    - ##### Molecule test example
    Just go to the root of the role **roles/x3infodesk-deployment-role-dependencies** and run the command, here is an example for using the **HOST_VAR_FILE_NAME** as *example_buttons.yml*:
    ```bash
    molecule test
    HOST_VAR_FILE_NAME="example_buttons.yml" molecule test
    ```
    ## License
    MIT / BSD
    ## Author Information
    [https://chaos.social/@fejao](https://chaos.social/@fejao)
    \ No newline at end of file
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment