Browse Source

please guillaume

tags/0.0.1^2
Julien Cabillot 2 years ago
parent
commit
d0a62089a8
5 changed files with 5 additions and 35 deletions
  1. +1
    -7
      defaults/main.yml
  2. +1
    -14
      tasks/docker-compose.yml
  3. +1
    -1
      tasks/setup-Amazon.yml
  4. +0
    -6
      tasks/setup-Debian.yml
  5. +2
    -7
      tasks/setup-RedHat.yml

+ 1
- 7
defaults/main.yml View File

@@ -1,28 +1,22 @@
---
# Edition can be one of: 'ce' (Community Edition) or 'ee' (Enterprise Edition).
docker_edition: 'ce'
docker_package: 'docker-{{ docker_edition }}'
docker_package_state: present

# Service options.
docker_service_state: started
docker_service_enabled: true
docker_restart_handler_state: restarted

# Docker Compose options.
docker_install_compose: true
docker_compose_version: "1.22.0"
docker_compose_version: "1.24.0"
docker_compose_path: /usr/local/bin/docker-compose

# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
docker_apt_release_channel: stable
docker_apt_arch: amd64
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"

# Used only for RedHat/CentOS/Fedora.
docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
docker_yum_repo_enable_edge: 0
docker_yum_repo_enable_test: 0

# A list of users who will be added to the docker group.
docker_users: []

+ 1
- 14
tasks/docker-compose.yml View File

@@ -1,19 +1,6 @@
---
- name: Check current docker-compose version.
command: docker-compose --version
register: docker_compose_current_version
changed_when: false
failed_when: false

- name: Delete existing docker-compose version if it's different.
file:
path: "{{ docker_compose_path }}"
state: absent
when: >
docker_compose_current_version.stdout is defined
and docker_compose_version not in docker_compose_current_version.stdout

- name: Install Docker Compose (if configured).
- name: Install docker-compose (if configured).
get_url:
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64
dest: "{{ docker_compose_path }}"


+ 1
- 1
tasks/setup-Amazon.yml View File

@@ -3,4 +3,4 @@
package:
name: "docker"
state: "present"
notify: restart docker
notify: "restart docker"

+ 0
- 6
tasks/setup-Debian.yml View File

@@ -1,10 +1,4 @@
---
- name: Ensure old versions of Docker are not installed.
package:
name:
- docker
- docker-engine
state: absent

- name: Ensure dependencies are installed.
apt:


+ 2
- 7
tasks/setup-RedHat.yml View File

@@ -1,11 +1,4 @@
---
- name: Ensure old versions of Docker are not installed.
package:
name:
- docker
- docker-common
- docker-engine
state: absent

- name: Copy Docker GPG key
copy:
@@ -41,6 +34,8 @@
option: enabled
value: '{{ docker_yum_repo_enable_test }}'

# To install docker-ce, we need container-selinux available from an extras repo.
# The repository name depends of the environment (AWS RHEL AMI has a specific naming).
- name: "Find extra repos"
shell: "set -o pipefail; yum repolist all | egrep -e '^rhui-REGION-rhel-server-extras' -e '^rhel-7-server-extras-rpms' | cut -d'/' -f1"
args:


Loading…
Cancel
Save