Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3 from bec-galaxy/develop
Browse files Browse the repository at this point in the history
Compatibility update.
  • Loading branch information
patbec authored Dec 31, 2023
2 parents 2510054 + 8a57526 commit ae47bf6
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 184 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

A collection to install **Docker** and configuring an **application stack**.

> Deprecated: Docker Compose V2 is incompatible with the Ansible python module.
The following steps are supported:

* Distribute a shared `docker-compose.yml` by using the template function.
* Distribute encrypted secrets through an `.env` file.
* Distribute files and folders for a mapped volume.

[Click here to go to the documentation](https://github.com/bec-galaxy/ansible-collection-docker/tree/main/roles/docker_compose).

<br>
* Distribute files and folders for a mapped volume.
12 changes: 12 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@ releases:
- Files in the shared folder are now templated with the correct subpath.
- Removing the .j2 extension only at the end of the filename.
release_date: "2023-10-03"
1.2.0:
changes:
minor_changes:
- Documentation updated.
known_issues:
- Docker python package is incompatible with the deprecated docker-compose lib in the latest version.
- The docker.compose module uses the deprecated docker-compose python package.
breaking_changes:
- Files were copied using the ansible.builtin.template command instead of the ansible.builtin.copy command.
bugfixes:
- Files have now been copied using the ansible.builtin.copy command.
release_date: "2023-12-31"
155 changes: 0 additions & 155 deletions docs/asset.svg

This file was deleted.

Binary file removed docs/logo.png
Binary file not shown.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
namespace: bec
name: docker

version: 1.1.0
version: 1.2.0
readme: README.md
authors:
- Patrick Becker <[email protected]>
Expand Down
6 changes: 1 addition & 5 deletions roles/docker_ce/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Docker CE Role for Ansible

This is a simple role to install **docker_ce** *(Community version)* from the official repository.

---

&uarr; [Back to top](#)
This is a simple role to install **docker_ce** *(Community version)* from the official repository.
2 changes: 1 addition & 1 deletion roles/docker_ce/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
when: not ansible_check_mode
ansible.builtin.pip:
name:
- docker
- docker==6.1.3
- docker-compose
become: true
tags:
Expand Down
19 changes: 3 additions & 16 deletions roles/docker_compose/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<img align="right" width="22%" src="../../docs/logo.png" alt="docker compose logo"/>

# Docker Compose Role for Ansible


Expand Down Expand Up @@ -64,7 +62,7 @@ Here are example of how this role can be used.
In this example, a web server is deployed using Docker. It distributes host-specific environment variables and a web page.

Your playbook can look like this:
<img src="../../docs/example_1.svg"/>
<img src="https://raw.githubusercontent.com/bec-galaxy/ansible-collection-docker/main/docs/example_1.svg"/>

Content of the `main.yml` file:
```yaml
Expand Down Expand Up @@ -112,16 +110,5 @@ Docker Compose takes the environment variables from the `.env` file and puts the
You can test the output yourself with the `docker compose config` command.

If a **shared template** should be used for the website, this can be implemented in this way:
<img src="../../docs/example_2.svg"/>
All files in the template folder `shared` are copied to the target systems.

## Licence

<img align="right" width="35%" src="../../docs/asset.svg" alt="docker compose logo"/>

This project is licensed under MIT - See the [LICENSE](LICENSE) file for more information.

---

&uarr; [Back to top](#)

<img src="https://raw.githubusercontent.com/bec-galaxy/ansible-collection-docker/main/docs/example_2.svg"/>
All files in the template folder `shared` are copied to the target systems.
2 changes: 1 addition & 1 deletion roles/docker_compose/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
block:
- name: Copy environment to destination directory
when: item.state == 'file'
ansible.builtin.template:
ansible.builtin.copy:
src: "{{ item.src }}"
dest: "{{ docker_compose_destination }}/{{ item.path }}"
mode: "{{ docker_compose_permissions }}"
Expand Down

0 comments on commit ae47bf6

Please sign in to comment.