Merge branch 'master' into debian-apt-amd64
This commit is contained in:
commit
377a6f3728
|
@ -5,7 +5,8 @@ env:
|
||||||
- distro: centos7
|
- distro: centos7
|
||||||
- distro: ubuntu1604
|
- distro: ubuntu1604
|
||||||
- distro: ubuntu1404
|
- distro: ubuntu1404
|
||||||
- distro: debian8
|
- distro: debian9
|
||||||
|
- distro: fedora27
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Configure test script so we can run extra tests after playbook is run.
|
# Configure test script so we can run extra tests after playbook is run.
|
||||||
|
|
|
@ -19,8 +19,12 @@ Available variables are listed below, along with default values (see `defaults/m
|
||||||
|
|
||||||
The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). You can also specify a specific version of Docker to install using a format like `docker-{{ docker_edition }}-<VERSION>`. And you can control whether the package is installed, uninstalled, or at the latest version by setting `docker_package_state` to `present`, `absent`, or `latest`, respectively.
|
The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterprise Edition). You can also specify a specific version of Docker to install using a format like `docker-{{ docker_edition }}-<VERSION>`. And you can control whether the package is installed, uninstalled, or at the latest version by setting `docker_package_state` to `present`, `absent`, or `latest`, respectively.
|
||||||
|
|
||||||
docker_install_compose: true
|
docker_restart_on_package_change: True
|
||||||
docker_compose_version: "1.16.1"
|
|
||||||
|
Whether to restart the Docker daemon after the Docker package is installed or updated. If this is set to `True`, this role will flush all handlers (run any of the handlers that have been notified by this and any other role up to this point in the play). The default setting helps avoid firewall clashes with Docker rules (e.g. when using custom `iptables` rules or the `geerlingguy.firewall` Ansible role).
|
||||||
|
|
||||||
|
docker_install_compose: True
|
||||||
|
docker_compose_version: "1.21.1"
|
||||||
docker_compose_path: /usr/local/bin/docker-compose
|
docker_compose_path: /usr/local/bin/docker-compose
|
||||||
|
|
||||||
Docker Compose installation options.
|
Docker Compose installation options.
|
||||||
|
@ -28,6 +32,7 @@ Docker Compose installation options.
|
||||||
docker_apt_arch: amd64
|
docker_apt_arch: amd64
|
||||||
docker_apt_release_channel: stable
|
docker_apt_release_channel: stable
|
||||||
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
||||||
|
docker_apt_ignore_key_error: True
|
||||||
|
|
||||||
(Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release.
|
(Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release.
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,11 @@
|
||||||
docker_edition: 'ce'
|
docker_edition: 'ce'
|
||||||
docker_package: "docker-{{ docker_edition }}"
|
docker_package: "docker-{{ docker_edition }}"
|
||||||
docker_package_state: present
|
docker_package_state: present
|
||||||
|
docker_restart_on_package_change: True
|
||||||
|
|
||||||
# Docker Compose options.
|
# Docker Compose options.
|
||||||
docker_install_compose: true
|
docker_install_compose: True
|
||||||
docker_compose_version: "1.16.1"
|
docker_compose_version: "1.21.1"
|
||||||
docker_compose_path: /usr/local/bin/docker-compose
|
docker_compose_path: /usr/local/bin/docker-compose
|
||||||
|
|
||||||
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
|
# Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed.
|
||||||
|
@ -14,8 +15,9 @@ docker_apt_release_channel: stable
|
||||||
# Architecture must be specified in order for updates to work. Choose between 'amd64' & 'i386'.
|
# Architecture must be specified in order for updates to work. Choose between 'amd64' & 'i386'.
|
||||||
docker_apt_arch: amd64
|
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 }}"
|
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
|
||||||
|
docker_apt_ignore_key_error: True
|
||||||
|
|
||||||
# Used only for RedHat/CentOS.
|
# Used only for RedHat/CentOS/Fedora.
|
||||||
docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo
|
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_edge: 0
|
||||||
docker_yum_repo_enable_test: 0
|
docker_yum_repo_enable_test: 0
|
||||||
|
|
|
@ -6,12 +6,15 @@ galaxy_info:
|
||||||
description: Docker for Linux.
|
description: Docker for Linux.
|
||||||
company: "Midwestern Mac, LLC"
|
company: "Midwestern Mac, LLC"
|
||||||
license: "license (BSD, MIT)"
|
license: "license (BSD, MIT)"
|
||||||
min_ansible_version: 2.0
|
min_ansible_version: 2.4
|
||||||
platforms:
|
platforms:
|
||||||
- name: EL
|
- name: EL
|
||||||
versions:
|
versions:
|
||||||
- 6
|
- 6
|
||||||
- 7
|
- 7
|
||||||
|
- name: Fedora
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
- name: Debian
|
- name: Debian
|
||||||
versions:
|
versions:
|
||||||
- jessie
|
- jessie
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Install Docker.
|
- name: Install Docker.
|
||||||
package: name={{ docker_package }} state={{ docker_package_state }}
|
package:
|
||||||
|
name: "{{ docker_package }}"
|
||||||
|
state: "{{ docker_package_state }}"
|
||||||
|
notify: restart docker
|
||||||
|
|
||||||
- name: Ensure Docker is started and enabled at boot.
|
- name: Ensure Docker is started and enabled at boot.
|
||||||
service:
|
service:
|
||||||
|
@ -14,5 +17,9 @@
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
|
- name: Ensure handlers are notified now to avoid firewall conflicts.
|
||||||
|
meta: flush_handlers
|
||||||
|
when: docker_restart_on_package_change
|
||||||
|
|
||||||
- include_tasks: docker-compose.yml
|
- include_tasks: docker-compose.yml
|
||||||
when: docker_install_compose
|
when: docker_install_compose
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
- docker
|
- docker
|
||||||
- docker-engine
|
- docker-engine
|
||||||
|
|
||||||
- name: Ensure depdencies are installed.
|
- name: Ensure dependencies are installed.
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
|
||||||
state: present
|
state: present
|
||||||
register: add_repository_key
|
register: add_repository_key
|
||||||
ignore_errors: true
|
ignore_errors: "{{ docker_apt_ignore_key_error }}"
|
||||||
|
|
||||||
- name: Ensure curl is present (on older systems without SNI).
|
- name: Ensure curl is present (on older systems without SNI).
|
||||||
package: name=curl state=present
|
package: name=curl state=present
|
||||||
|
|
Loading…
Reference in New Issue
Block a user