mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2025-09-26 17:51:03 +02:00
add docker-app with completion
This commit is contained in:
parent
2c0b645e4d
commit
9a62b70c59
@ -11,10 +11,16 @@ docker_restart_handler_state: restarted
|
|||||||
|
|
||||||
# Docker Compose options.
|
# Docker Compose options.
|
||||||
docker_install_compose: true
|
docker_install_compose: true
|
||||||
docker_compose_version: "1.22.0"
|
docker_compose_version: "1.23.2"
|
||||||
docker_compose_path: /usr/local/bin/docker-compose
|
docker_compose_path: /usr/local/bin/docker-compose
|
||||||
docker_compose_completion_path: /etc/bash_completion.d/docker-compose
|
docker_compose_completion_path: /etc/bash_completion.d/docker-compose
|
||||||
|
|
||||||
|
# Docker App options.
|
||||||
|
docker_install_app: true
|
||||||
|
docker_app_version: "v0.6.0"
|
||||||
|
docker_app_path: /usr/local/bin/docker-app
|
||||||
|
docker_app_completion_path: /etc/bash_completion.d/docker-app
|
||||||
|
|
||||||
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
|
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
|
||||||
docker_apt_release_channel: stable
|
docker_apt_release_channel: stable
|
||||||
docker_apt_arch: amd64
|
docker_apt_arch: amd64
|
||||||
|
42
tasks/docker-app.yml
Normal file
42
tasks/docker-app.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
- name: Check current docker-app version.
|
||||||
|
command: docker-app --version
|
||||||
|
register: docker_app_current_version
|
||||||
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
check_mode: false
|
||||||
|
|
||||||
|
- name: Delete existing docker-app version if it's different.
|
||||||
|
file:
|
||||||
|
path: "{{ docker_app_path }}"
|
||||||
|
state: absent
|
||||||
|
when: >
|
||||||
|
docker_app_current_version.stdout is defined
|
||||||
|
and docker_app_version not in docker_app_current_version.stdout
|
||||||
|
|
||||||
|
- name: Download Docker app (if configured).
|
||||||
|
unarchive:
|
||||||
|
src: https://github.com/docker/app/releases/download/{{ docker_app_version }}/docker-app-linux.tar.gz
|
||||||
|
dest: "/tmp"
|
||||||
|
remote_src: yes
|
||||||
|
when: >
|
||||||
|
docker_app_current_version.stdout is defined
|
||||||
|
and docker_app_version not in docker_app_current_version.stdout
|
||||||
|
or not docker_app_current_version.stdout is defined
|
||||||
|
|
||||||
|
- name: Install Docker app (if configured).
|
||||||
|
copy:
|
||||||
|
src: /tmp/docker-app-linux
|
||||||
|
dest: "{{ docker_app_path }}"
|
||||||
|
remote_src: yes
|
||||||
|
mode: 0755
|
||||||
|
when: >
|
||||||
|
docker_app_current_version.stdout is defined
|
||||||
|
and docker_app_version not in docker_app_current_version.stdout
|
||||||
|
or not docker_app_current_version.stdout is defined
|
||||||
|
|
||||||
|
- name: Install Docker app completion
|
||||||
|
shell: "docker-app completion >> {{ docker_app_completion_path }}"
|
||||||
|
args:
|
||||||
|
creates: "{{ docker_app_completion_path }}"
|
||||||
|
|
@ -27,5 +27,8 @@
|
|||||||
- include_tasks: docker-compose.yml
|
- include_tasks: docker-compose.yml
|
||||||
when: docker_install_compose
|
when: docker_install_compose
|
||||||
|
|
||||||
|
- include_tasks: docker-app.yml
|
||||||
|
when: docker_install_app
|
||||||
|
|
||||||
- include_tasks: docker-users.yml
|
- include_tasks: docker-users.yml
|
||||||
when: docker_users
|
when: docker_users
|
||||||
|
Loading…
Reference in New Issue
Block a user