- This should be a **list** entry with the the information of the images that should be builded/created from this role.
- This list include entries with the default keys:
-**docker_file_path**
- The path from the location of the **Dockerfile** for the image to be builded.
-**docker_image_name**
- The name of the image to be builded.
-**docker_image_tag**
- The tag of the image to be builded.
-**DEFAULT**: The default values are seeted for the [c3InfoDesk-Printer](https://git.cccv.de/fejao/c3infodesk-printer) project.
```yaml
c3infodesk_deployment_docker_images_list:
-docker_file_path:docker/cups/Dockerfile
docker_image_name:c3printing-cups
docker_image_tag:latest
-docker_file_path:docker/app/Dockerfile
docker_image_name:c3printing-app
docker_image_tag:latest
-docker_file_path:docker/proxy/Dockerfile
docker_image_name:c3printing-proxy
docker_image_tag:latest
```
## Dependencies
...
...
@@ -117,8 +108,10 @@ You can test this locally using **DIND (docker in docker)** at your own computer
- ### Testing requirements
You need docker installed at your system and the [ansible molecule](https://ansible.readthedocs.io/projects/molecule/installation/).
You might have to set DIND at your system, for linux, you can create the file **/etc/docker/daemon.json**
- #### 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
...
...
@@ -132,11 +125,17 @@ You can test this locally using **DIND (docker in docker)** at your own computer
}
```
- ### Using molecule
Just go to the root of the role **roles/dependencies** and run the command:
- ### 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
molecule test
HOST_VAR_FILE_NAME="example_buttons.yml" molecule test