Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
webarch
docker
Commits
f80af200
Commit
f80af200
authored
2 years ago
by
Chris Croome
Browse files
Options
Downloads
Patches
Plain Diff
update-alternatives to remove docker-compose
parent
4ec538e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#21770
failed
2 years ago
Stage: lint
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/compose.yml
+0
-44
0 additions, 44 deletions
tasks/compose.yml
tasks/compose_v1.yml
+8
-0
8 additions, 0 deletions
tasks/compose_v1.yml
with
8 additions
and
44 deletions
tasks/compose.yml
deleted
100644 → 0
+
0
−
44
View file @
4ec538e1
---
-
name
:
Install Docker Compose
block
:
-
name
:
Remove Docker Composer version
1
block
:
-
name
:
Docker Compose version 1 absent
ansible.builtin.file
:
path
:
/usr/local/bin/docker-compose
state
:
absent
-
name
:
Docker Compose version 1 Bash completion absent
ansible.builtin.file
:
path
:
/etc/bash_completion.d/docker-compose
state
:
absent
-
name
:
Docker Compose apt package absent
ansible.builtin.apt
:
pkg
:
-
docker-compose
state
:
absent
when
:
not docker_compose_v1 | bool
-
name
:
Docker Compose present
ansible.builtin.apt
:
pkg
:
-
docker-compose-plugin
state
:
present
-
name
:
Check the Docker Compose version that is available in the default PATH using docker compose
ansible.builtin.command
:
docker compose --ansi=never version
check_mode
:
false
changed_when
:
false
register
:
docker_compose_installed
-
name
:
Print the installed version of Docker Compose
ansible.builtin.debug
:
var
:
docker_compose_installed.stdout
tags
:
-
docker-compose
...
This diff is collapsed.
Click to expand it.
tasks/compose_v1.yml
+
8
−
0
View file @
f80af200
...
...
@@ -20,6 +20,14 @@
loop_control
:
loop_var
:
path
-
name
:
Remove Docker Compose alternatives
command
:
"
{{
cmd
}}"
loop
:
-
update-alternatives --remove docker-compose /usr/local/bin/docker-compose
-
update-alternatives --remove docker-compose /usr/local/bin/compose-switch
loop_control
:
loop_var
:
cmd
when
:
( docker_compose_v1 is defined ) and ( not docker_compose_v1 | bool )
tags
:
-
docker
...
...
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