Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Compose Service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSI Ansible
Compose Service
Commits
6f124c53
Verified
Commit
6f124c53
authored
9 months ago
by
David Mehren
Browse files
Options
Downloads
Patches
Plain Diff
Use community.docker.docker_compose_v2 instead of shell commands
parent
027fd30d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-1
6 additions, 1 deletion
README.md
handlers/main.yml
+0
-2
0 additions, 2 deletions
handlers/main.yml
meta/main.yml
+3
-0
3 additions, 0 deletions
meta/main.yml
tasks/main.yml
+4
-16
4 additions, 16 deletions
tasks/main.yml
with
13 additions
and
19 deletions
README.md
+
6
−
1
View file @
6f124c53
...
...
@@ -10,4 +10,9 @@ Set up a service using Docker Compose
`compose_service_run_prune`
If prune should be run after deploying (on by default)
`compose_service_registry_url`
(optional) Custom registry URL
`compose_service_registry_username`
(optional) Custom registry credentials
`compose_service_registry_password`
(optional) Custom registry credentials
\ No newline at end of file
`compose_service_registry_password`
(optional) Custom registry credentials
### Contributors
-
Fachschaft Informatik, TU Dortmund
-
Rhein-Ruhr Systemtechnik GmbH, Bochum
\ No newline at end of file
This diff is collapsed.
Click to expand it.
handlers/main.yml
deleted
100644 → 0
+
0
−
2
View file @
027fd30d
---
# handlers file for compose_service
This diff is collapsed.
Click to expand it.
meta/main.yml
+
3
−
0
View file @
6f124c53
...
...
@@ -8,5 +8,8 @@ galaxy_info:
-
name
:
Ubuntu
versions
:
-
all
-
name
:
Debian
versions
:
-
all
dependencies
:
-
role
:
geerlingguy.docker
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
4
−
16
View file @
6f124c53
...
...
@@ -26,25 +26,13 @@
password
:
"
{{
compose_service_registry_password
}}"
when
:
compose_service_registry_url is defined
-
name
:
Validate compose file
ansible.builtin.command
:
cmd
:
docker compose --file docker-compose.yml config --quiet
chdir
:
/opt/{{ compose_service_name }}
changed_when
:
false
-
name
:
Pull container images
ansible.builtin.command
:
cmd
:
docker compose --ansi never --progress plain --file docker-compose.yml pull
chdir
:
/opt/{{ compose_service_name }}
register
:
temp_compose_pull
changed_when
:
"
'Downloading'
in
temp_compose_pull.stdout"
community.docker.docker_compose_v2_pull
:
project_src
:
/opt/{{ compose_service_name }}
-
name
:
Start containers
ansible.builtin.command
:
cmd
:
docker compose --ansi never --progress plain --file docker-compose.yml up --detach
chdir
:
/opt/{{ compose_service_name }}
register
:
temp_compose_up
changed_when
:
"
'Started'
in
temp_compose_up.stdout"
community.docker.docker_compose_v2
:
project_src
:
/opt/{{ compose_service_name }}
-
name
:
Prune unused and dangling images & containers
community.docker.docker_prune
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment